So, in my theme I have the following:
settings[css_inline][all][] = css/mycritical.css
stylesheets[all][] = css/mycritical.css
stylesheets[all][] = css/mynoncritical.cssThe 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.cssThis 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
Comment #2
Chris Gillis commentedComment #3
kurapov commentedTry 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().