[cssom] spec for inserting @import rules should explain effects on child stylesheet lists, etc. #4821
Labels
cssom-1
Current Work
tag-tracker
Group bringing to attention of the TAG, or tracked by the TAG but not needing response.
The spec for inserting a CSS rule specifies how the rule gets inserted into a style sheet. It seems like the rule being inserted can be an
@import
rule, which seems like it should lead to loading of a CSS style sheet (linked from theCSSImportRule
sstyleSheet
property) and population of theCSSStyleSheet
object that is being imported.It seems like this should probably be specified in a bit more detail. In particular, given that the spec says:
it seems like what happens is that the linked
CSSStyleSheet
is created immediately, but gets populated later as the style sheet loads.Some points that aren't clear are:
CSSStyleSheet
get populated immediately when the newly-loaded style sheet is parsed (and then essentially follow this algorithm for adding rules recursively), or does it wait for other subresources of that style sheet to load?It also seems that it would be useful for this to be specified better because a number of other specifications, in particular CSS Modules (which we got here from w3ctag/design-reviews#405) and Constructible Stylesheets (w3ctag/design-reviews#308, #3433) are disallowing
@import
rules, a restriction that seems likely to stick around if it's done initially, and which we feel may not really be there for good underlying reasons (and may be related to the lack of solid specification here).The text was updated successfully, but these errors were encountered: