Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-page-3] Whitespace between @page and page selector #3239

Closed
xfq opened this issue Oct 23, 2018 · 4 comments
Closed

[css-page-3] Whitespace between @page and page selector #3239

xfq opened this issue Oct 23, 2018 · 4 comments

Comments

@xfq
Copy link
Member

xfq commented Oct 23, 2018

In § 4.3. @page rule grammar of css-page-3:

@page { ... }
@page :left { ... }
@page :right { ... }
@page LandscapeTable { ... }
@page CompanyLetterHead:first { ... } /*  identifier and pseudo page. */
@page:first { ... }
@page toc, index { ... }
@page :blank:first { ... }

I'm wondering if @page:first { ... } is correct or not?

@xfq xfq added the css-page-3 Current Work label Oct 23, 2018
@tabatkins
Copy link
Member

That's probably unintentional, but it's also technically valid. The grammar doesn't explicitly require whitespace between @page and the following stuff, so per the standard grammar rules, all that's required is that the tokenizer properly separate things. @page:first correctly tokenizes (as AT-KEYWORD DELIM IDENT), so it should parse.

@tabatkins
Copy link
Member

How do implementations handle this?

@faceless2
Copy link

faceless2 commented Feb 6, 2020

  • We allow it
  • Prince allows it
  • VivlioStyle allows it

They are the only three I tested.

Edit: it was allowed in CSS2.1 (ref) and is tested by page-grammar-001.xht and page-grammar-002.xht.

So I think you could reasonably conclude that this is both intentional and allowed. Closeable?

@tabatkins
Copy link
Member

Thanks, I'm gonna go ahead and close this, then, since absent any prose requiring whitespace there, this is definitely valid per CSS Syntax and the Value Definition Syntax for blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants