w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.52k stars 673 forks source link

Should serialization of @page selectors include "@page"? #2643

Open dbaron opened 6 years ago

dbaron commented 6 years ago

w3c/web-platform-tests#6183 points out that:

Given that there is lack of interop today as to whether a rule

@page :left {
  margin: 0;
}

should serialize the selector text through CSSPageRule.selectorText as @page :left or :left, it seems like the WG should agree on which is the right behavior.

I tend to think that serializing to :left is the right thing to do, but given that implementations currently differ, I think it's worth bringing to the WG.

dbaron commented 6 years ago

I wrote a test to check browser behavior.

dbaron commented 6 years ago

(My preference is still the Chromium behavior.)

dbaron commented 6 years ago

@litherum @smfr do you think WebKit would be ok with changing behavior here?

tabatkins commented 6 years ago

Chrome's behavior seems like the obviously correct one.

mstensho commented 9 months ago

Gecko now supports (for some time already, for all I know) @page selectors and CSSPageRule, and serializes @page :left as :left (CSSPageRule.selectorText) - just like Chromium. WebKit still serializes as @page :left