Current version of Chrome and FF hoist declarations in @page:
const sheet = new CSSStyleSheet
sheet.replaceSync(`
@page {
@top-left {
content: "green";
color: green;
}
color: red;
}
style {
@media {
color: green;
}
color: red;
}
`)
sheet.cssRules[0].cssText; // @page { color: red; @top-left { ...; color: green; } }
sheet.cssRules[1].cssText; // style { @media { color: green } color: red; }
If I am not mistaken, @page (with no page selector) and margin rules have the same specificity. So this might be unexpected, like in style rules.
Should they be wrapped in CSSNestedDeclarations whose style attribute is a CSSPageDescriptors?
Current version of Chrome and FF hoist declarations in
@page:If I am not mistaken,
@page(with no page selector) and margin rules have the same specificity. So this might be unexpected, like in style rules.Should they be wrapped in
CSSNestedDeclarationswhosestyleattribute is aCSSPageDescriptors?