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

[mediaqueries][css-conditional] Allow empty functions in <general-enclosed> #6803

Closed
fantasai opened this issue Nov 8, 2021 · 4 comments
Closed

Comments

@fantasai
Copy link
Collaborator

fantasai commented Nov 8, 2021

@andruud wrote in #6312 (comment)

The reason Chromium appears to evaluate not fn() to false in the demo is because not fn() is actually invalid grammar. (<any-value>, requires one or more tokens).

Since this is about forwards-compatible parsing and evaluation, it seems to me it would make more sense if <any-value> were optional so that empty functional notations would be syntactically valid.

@andruud
Copy link
Member

andruud commented Nov 9, 2021

Coincidentally, we actually made a ninja-edit for this last week. #6799

@tabatkins
Copy link
Member

Yeah, the grammar was an accidental leftover from when <any-value> was implicitly optional (but this caused more confusion than it solved). It was always intended that empty functions should be allowed, and the edits are in now to reflect that.

@fantasai
Copy link
Collaborator Author

fantasai commented Dec 2, 2021

Reopening to get WG approval on this, since it's updating a CR. Should be routine.

@fantasai fantasai reopened this Dec 2, 2021
@astearns astearns added this to Temp3 in December 8 meeting Dec 7, 2021
@atanassov atanassov added this to Can wait until 2022 in December 15 meeting Dec 15, 2021
@atanassov atanassov moved this from Can wait until 2022 to Top priority in December 15 meeting Dec 15, 2021
@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed Allow empty functions in <general-enclosed>, and agreed to the following:

  • RESOLVED: Accept change to allow empty functional notations in <general-enclosed>
The full IRC log of that discussion <fantasai> Topic: Allow empty functions in <general-enclosed>
<fantasai> github: https://github.com//issues/6803
<fantasai> TabAtkins: We had some leftover grammar from a previous change that accidentally implied that if you had a <general-enclosed> in functional form it had to ahve something inside the parens
<fantasai> TabAtkins: previously could be empty
<fantasai> TabAtkins: small change to make the value optional, so that foo() would be valid
<TabAtkins> @media fn() {...}
<TabAtkins> @media fn(foo) {...}
<fantasai> TabAtkins: wanted to make sure this counts as <general-enclosed> with unknown value rather than syntax error
<fantasai> florian: asking for approval because spec is in CR
<fantasai> RESOLVED: Accept change to allow empty functional notations in <general-enclosed>

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

No branches or pull requests

5 participants