*Contact emails*
[email protected]

*Specification*
https://drafts.csswg.org/cssom/#the-csspagerule-interface

*Summary*
CSSPageRule.style now returns a CSSPageDescriptors object instead of a generic CSSStyleDeclaration. The new interface exposes the @page descriptors — size, page-orientation and the margin family — as named attributes in both camel-cased and dashedform, and accepts only declarations that are valid in the page context. This matches the CSSOM specification and the behaviour already shipped by Firefox and implemented by WebKit, and it makes @page support detectable via window.CSSPageDescriptors.

*Blink component*
css <https://issues.chromium.org/issues?q=customfield1222907:%22css%22>

*Web Feature ID*
Missing feature

*Motivation*

Chrome exposes an @page rule's declaration block as a plain CSSStyleDeclaration, which causes some problems:

1. No feature detection. MDN's documented idiom is if (typeof window.CSSPageDescriptors === "undefined"). Chrome fails it, so authors cannot distinguish "unsupported" from "supported".

2. Page-only descriptors leak onto every declaration. 'size' in element.style is true and getComputedStyle(el).size returns "", even though size can never apply to an element. Property enumeration and feature testing see phantom entries.

3. CSS.supports('size','a4') returns true — Chrome claims a page-only descriptor is a supported element property.

4. @page accepts inert declarations. pageRule.style.setProperty('float','left') is accepted and serialized into cssText with no signal that it can never take effect, diverging from the other engines.


*Initial public proposal*
/No information provided/

*Search tags*
cssom <https://chromestatus.com/features#tags:cssom>,@page <https://chromestatus.com/features#tags:@page>,print <https://chromestatus.com/features#tags:print>,descriptors <https://chromestatus.com/features#tags:descriptors>,CSSPageRule <https://chromestatus.com/features#tags:CSSPageRule>

*Goals for experimentation*
None

*Requires code in //chrome?*
False

*Tracking bug*
https://issues.chromium.org/issues/541924681

*Estimated milestones*

No milestones specified



*Link to entry on the Chrome Platform Status*
https://chromestatus.com/feature/5196252624060416?gate=6310173531570176

This intent message was generated byChrome Platform Status <https://chromestatus.com/>.

--
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/b7adfb84-48e7-4991-958e-8306c0f9552d%40igalia.com.

Reply via email to