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] Replace CSS 2.1 syntax definitions by CSS syntax #632

Closed
SebastianZ opened this issue Oct 21, 2016 · 3 comments
Closed

[css-page-3] Replace CSS 2.1 syntax definitions by CSS syntax #632

SebastianZ opened this issue Oct 21, 2016 · 3 comments

Comments

@SebastianZ
Copy link
Contributor

SebastianZ commented Oct 21, 2016

The minutes from 2016-10-12 resolved on removing the CSS grammar section from CSS 2.2 and instead refer to the CSS Syntax module. Though the CSS Paged Media Module still uses that grammar for the definition of the @page rule.

This syntax should be replaced by something like this*:

@page <page-selector-list> { <page-body> }

where
<page-selector-list> = [ <page-selector># ]?
<page-body> = <declaration>? [ ; <page-body> ]? | <page-margin-box> <page-body>
<page-selector> = <pseudo-page>+ | <ident> <pseudo-page>*
<page-margin-box> = <page-margin-box-type> { <declaration-list> }
<pseudo-page> = : [ left | right | first | blank ]
<page-margin-box-type> = @top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom

Sebastian

* For reference, I used that syntax definition for @page on MDN.

@SebastianZ
Copy link
Contributor Author

The previous syntax definition got replaced by one following the Syntax spec. in 30e1273.

This change let parts still be defined in prose. @tabatkins As you made the change, would you agree to define everything in the formal syntax as I did back then?

Sebastian

@tabatkins
Copy link
Member

I'm not sure I understand your question. The only difference between the grammar you suggested in the OP and what I eventually committed is that I used the guidelines in the Syntax spec for defining rules (which requires prose to specify what's allowed in a given <definition-list>), while your grammar tries to enforce the prose more strictly in the grammar itself. I intentionally wrote the Syntax guidelines to not do that, precisely because writing a correct and understandable grammar for block contents in various situations is difficult.

@SebastianZ
Copy link
Contributor Author

Fair enough.

Sebastian

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

2 participants