Skip to content

[css-syntax] problem with consuming qualified rule #3632

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

Closed
tabatkins opened this issue Feb 7, 2019 · 0 comments
Closed

[css-syntax] problem with consuming qualified rule #3632

tabatkins opened this issue Feb 7, 2019 · 0 comments
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-syntax-3 Testing Unnecessary Memory aid - issue doesn't require tests

Comments

@tabatkins
Copy link
Member

(migrated from mailing list)

Johannes Koch said:

5.4.3. Consume a qualified rule

Create a new qualified rule with its prelude initially set to an empty
list, ...

When coming from 5.3.3.

  1. If the current input token is an <EOF-token>, return a syntax error.
    ...
    Otherwise, consume a qualified rule and let rule be the return
    value. If nothing was returned, return a syntax error.

I think, in step 3. the current input token has to be reconsumed before
consuming a qualified rule.

Then my remark in my mail 'problem with consume list of rules':

The same applies to 5.4.1
anything else

also reconsuming the current input token before consuming a qualified
rule.

does not apply, leavin only the problem with the at-keyword rule and the
puzzling CDO/CDC stuff.


Tab Atkins said:

The same applies to 5.4.1
anything else

also reconsuming the current input token before consuming a qualified >
rule.

does not apply, leavin only the problem with the at-keyword rule

Fixed as part of my larger review, spurred by your earlier bug.

and the
puzzling CDO/CDC stuff.

Legacy stuff. Way back in the day, when CSS was first being
implemented, legacy browsers didn't understand it and would just
output a <style> as an unknown element filled with a bunch of text.
JS already solved this in the <script> element by defining that were additional ways to write line-comments, identical to
using //, so you could wrap your JS in them and legacy agents wouldn't
display the contents (since they thought it was commented out).

CSS did the same thing, so are just ignored when they
show up at top-level between rules.

@tabatkins tabatkins added css-syntax-3 Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. Needs Testcase (WPT) labels Feb 7, 2019
@tabatkins tabatkins added Testing Unnecessary Memory aid - issue doesn't require tests and removed Needs Testcase (WPT) labels Feb 15, 2019
@tabatkins tabatkins added this to the CSS Syntax 3 June 2019 CR milestone Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-syntax-3 Testing Unnecessary Memory aid - issue doesn't require tests
Projects
None yet
Development

No branches or pull requests

1 participant