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

Ulrich Pogson grapplerulrich at gmail.com
Wed Jul 16 20:38:35 UTC 2014

@bruce I was the one who implemented that in Responsive. We have had to
date no issue with it.

"One loads the "real" style first" We do not load the
`wp-content/themes/responsive/style.css` as it is not needed. We only load
the version in a subfolder.

If you want to disable the parent css you can easily do it in a child theme
functions.php with wp_dequeue_style


On 16 July 2014 21:36, Emil Uzelac <emil at uzelac.me> wrote:

> Empties are ugly and not really needed.
> This is what I do for my clients:
>     // Parent theme style.
>  wp_enqueue_style( 'my-style', get_template_directory_uri() .
> '/style.css', array(), null );
>  // Child theme style.
>     if ( is_child_theme() ) {
> wp_enqueue_style( 'my-child-style', get_stylesheet_uri(), array(), null );
>  }
> Parent style.css remains at the usual place and when child is active it
> will add it's own stylesheet :)
> And of course no @imports either ;)
> On Wed, Jul 16, 2014 at 2:26 PM, Weaver Theme <weavertheme at gmail.com>
> wrote:
>> 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
> _______________________________________________
> 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/67bfad3d/attachment-0001.html>

More information about the theme-reviewers mailing list