-
Notifications
You must be signed in to change notification settings - Fork 664
Open
Milestone
Description
The flattenCss function in optimize.js will skip imports that contain media queries with expressions:
@import url('somefile.css') screen and (min-width:768px)
This makes sense. The problem is that the function will still inline other imports that occur before ones that are skipped. These skipped @import rules become invalid and are ignored by browsers.
The W3C spec for CSS 2.1 states in section 4.1.5 At-rules:
CSS 2.1 user agents must ignore any
@importrule that occurs inside a block or after any non-ignored statement other than an@charsetor an@importrule.
flattenCss should first check if the file contains any imports that would be skipped before inlining imports.
Metadata
Metadata
Assignees
Labels
No labels