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-nesting-1] Move to FPWD #7796

Closed
chrishtr opened this issue Sep 26, 2022 · 3 comments
Closed

[css-nesting-1] Move to FPWD #7796

chrishtr opened this issue Sep 26, 2022 · 3 comments
Labels
Administrative Tracker For external review / publication tracking issues. css-nesting-1 Current Work

Comments

@chrishtr
Copy link
Contributor

With the resolution of #4748, the nesting syntax is basically decided. I'd like us to move to FPWD for nesting to put it on the standards track.

https://drafts.csswg.org/css-nesting-1/

@xfq xfq added the css-nesting-1 Current Work label Sep 28, 2022
@fantasai
Copy link
Collaborator

Looks like we already have an FPWD: https://www.w3.org/TR/css-nesting-1/

@fantasai
Copy link
Collaborator

fantasai commented Sep 28, 2022

Btw, I do think there are some serious problems with the syntax that need to be worked out, and I'd like to see that marked clearly as an issue in the draft. I'll file a follow-up issue on it later, but discussing it with @LeaVerou, the short version is:

  • incompatibility with syntax outside of nested context, and with syntax within @scope, invites a lot of copy-paste errors
  • the requirement to include & within all the selectors in a list even beyond disambiguation (instead of allowing relative selectors) is annoying to type, easy to forget, and makes automated (and manual) conversion of existing code much more difficult (requires selector parsing rather than regex).

So even if we're not adopting the nested-bracket syntax proposed in #4748, I think we still have more design work to do here.

@LeaVerou
Copy link
Member

To follow up on @fantasai's comment above, at first I rejected discussion saying we have explored the design space, and resolved there's nothing better than the current proposal, but after some discussion, I’m convinced she's right that there's more design work to do here, ideally to figure out a way to switch to rule parsing mode within a rule that doesn't involve editing every single selector. We already have relative selectors in :has() and @scope and should probably follow the same pattern here, rather than having an entirely different type of relative selector.

@astearns astearns removed the Agenda+ label Oct 4, 2022
@fantasai fantasai closed this as completed Oct 5, 2022
@fantasai fantasai added the Administrative Tracker For external review / publication tracking issues. label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Administrative Tracker For external review / publication tracking issues. css-nesting-1 Current Work
Projects
None yet
Development

No branches or pull requests

5 participants