So, in my theme I have the following:

settings[css_inline][all][] = css/mycritical.css
stylesheets[all][] = css/mycritical.css
stylesheets[all][] = css/mynoncritical.css

The problem is that mycritical.css is included once inline, and then again in the JS load. That seems inefficient, so I tried this:

settings[css_inline][all][] = css/mycritical.css
stylesheets[all][] = css/mynoncritical.css

This works great... until you turn off preprocessing and the critical styles disappear.

Ideally it would be great if the critical styles were automatically removed from the queue if they are being inlined.

Comments

Chris Gillis created an issue. See original summary.

Chris Gillis’s picture

Issue summary: View changes
kurapov’s picture

Try the patch in my proposal: #2650264: Support for LESS files included in theme - it seems to work in your case because core simply ignores duplicate files added by drupal_add_css().