[wp-trac] [WordPress Trac] #25927: Remove the theme information from style.css and add a theme manifest file

WordPress Trac noreply at wordpress.org
Fri Oct 23 16:12:55 UTC 2015


#25927: Remove the theme information from style.css and add a theme manifest file
-----------------------------+------------------------------
 Reporter:  jolyonruss       |       Owner:
     Type:  feature request  |      Status:  reopened
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Themes           |     Version:  3.7.1
 Severity:  normal           |  Resolution:
 Keywords:  2nd-opinion      |     Focuses:
-----------------------------+------------------------------

Comment (by helen):

 Replying to [comment:7 atomicjack]:
 > Currently, if you're using a mixture of these tools and frameworks, you
 will usually compile and minify your CSS on the fly, which removes
 'comments', thus breaking the style.css. So instead, a manifest file for
 storing the theme information, or even just a theme-config.php, would be
 ideal.

 FWIW, this is being done successfully already, typically via one of two
 methods:
 * The root `style.css` file serves only as a manifest and is never
 actually enqueued. The compressed stylesheet is located elsewhere (e.g.
 within `/assets/css/` and enqueued from there. I am not opining on
 continuing to use a CSS file for this kind of info, but this is
 essentially the same result.
 * The theme information comment in `style.css` is notated in a way that
 the compiling/minifying routine won't strip. Sass does not strip `/* */`
 comments, and `clean-css` (the most commonly used minifier as far as I
 know) keeps "loud" comments, which work just fine for theme info: `/*!
 */`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25927#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list