[theme-reviewers] Best Practice Question: style.css
Edward Caissie
edward.caissie at gmail.com
Wed Jul 16 20:34:12 UTC 2014
I'm neither for nor against an "empty" style.css (from a guidelines point
of view) ... but if it's a matter of over-writing the "buried" stylesheet
why not just (copy and paste, then) dequeue it and carry on?
Link: http://codex.wordpress.org/Function_Reference/wp_dequeue_style
Edward Caissie
aka Cais.
On Wed, Jul 16, 2014 at 3:36 PM, 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/2a80893f/attachment.html>
More information about the theme-reviewers
mailing list