-
Notifications
You must be signed in to change notification settings - Fork 757
Open
Labels
css-page-3Current WorkCurrent Work
Description
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?
Metadata
Metadata
Assignees
Labels
css-page-3Current WorkCurrent Work