[theme-reviewers] Best Practice Question: style.css

Philip M. Hofer (Frumph) philip at frumph.net
Wed Jul 16 19:35:45 UTC 2014


I found this troublesome to a very large degree on some themes where overrides couldn’t happen directly in the child theme because of load order so the theme had an override box in the theme options to compensate but shaking my head about it; it feels totally doing-it-wrong.

I’ve even seen one theme where they had ANOTHER style-override.css file meta tag in the header.php that happens after the wp_head execution where advise people to use that to place their overrides in.

Then plugins like jetpacks edit-css module and my theme companion; you can never be sure if the override will happen after their wp_head injection of their overrides; ugh it’s just a mess when theme developers do that.

..pure headache /agree

From: Weaver Theme 
Sent: Wednesday, July 16, 2014 12:26 PM
To: Discussion list for WordPress theme reviewers. 
Subject: [theme-reviewers] Best Practice Question: style.css

I've been looking at some themes lately, and have noticed what may be a trend in how style.css is handled.


A number of themes, including Responsive, for example, are providing an "empty" style.css with just the header info needed to work with WP, while providing the actual style in a style file buried in some subdirectory. One loads the "real" style first, followed by the standard style.css (to get child themes)


I can see both positives and negatives with this. 

It makes it a little harder for users to mess with it directly.

It allows a theme to more easily load one of several style sheets depending on options, perhaps.

It simplifies creation of child themes in that they don't have to @import the parent stylesheet (if they know the parent is using this practice.)


The main disadvantage I see is that a child theme can't do a total style replacement by NOT @importing the parent.



Any thoughts on this? It seems there should be some guidelines on and "empty" style.css and putting the theme style elsewhere. It really does affect how child themes deal with the parent style.css.

Bruce Wampler.



--------------------------------------------------------------------------------
_______________________________________________
theme-reviewers mailing list
theme-reviewers at lists.wordpress.org
http://lists.wordpress.org/mailman/listinfo/theme-reviewers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140716/6d151274/attachment.html>


More information about the theme-reviewers mailing list