ThemeShaper Forums » Thematic


Question About Importing CSS From Parent Theme

(2 posts)
  • Started 8 years ago by zenofwordpress
  • Latest reply from middlesister
  • This topic is not resolved
  1. I was looking at the sample child theme that comes with Thematic. The child theme's style.css not only imports thematic's style.css, but it also imports all the css files that thematic's style.css imports. Why is this? In my experiments, it is sufficient to just import the parent's style.css, which automatically imports in any css files that the parent's style.css imports. Thanks

    Posted 8 years ago #
  2. middlesister

    If your child theme will look very much like the parent, then importing the parents' style.css and just adding your own few custom style declarations might be enough. But the way thematic does it makes it easier to make big changes with less code. You can for example change the layout of the site simply by changing the call for 2c-r-fixed.css to 3c-r-fixed.css for a three column layout or to 2c-l-fixed.css for having the sidebar on the left. Or you can make your own layout file.

    These kind of changes would be a hassle to do if everything was in one file. Now, you only need to change a single line of code. And the same goes for the rest of the files. Make your own typography file but keep the layout intact, etc. By making things modular, you can choose what to keep from the parent theme and what to change in the child theme with less work and less copying of unnecessary code.

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.