#791: Spec review for CSS Nesting

Visit on Github.

Opened Dec 5, 2022

Wotcher TAG!

I'm requesting a TAG review of CSS Nesting.

CSS Nesting allows users to write less repetitive selectors, using syntax similar to SASS and other preprocessors.

Security and Privacy self-review:

2.1. What information might this feature expose to Web sites or other parties, and for what purposes is that exposure necessary?
No additional information.
2.2. Do features in your specification expose the minimum amount of information necessary to enable their intended uses?
Yes.
2.3. How do the features in your specification deal with personal information, personally-identifiable information (PII), or information derived from them?
No PII.
2.4. How do the features in your specification deal with sensitive information?
No change.
2.5. Do the features in your specification introduce new state for an origin that persists across browsing sessions?
No.
2.6. Do the features in your specification expose information about the underlying platform to origins?
No.
2.7. Does this specification allow an origin to send data to the underlying platform?
No.
2.8. Do features in this specification enable access to device sensors?
No.
2.9. Do features in this specification enable new script execution/loading mechanisms?
No.
2.10. Do features in this specification allow an origin to access other devices?
No.
2.11. Do features in this specification allow an origin some measure of control over a user agent’s native UI?
No.
2.12. What temporary identifiers do the features in this specification create or expose to the web?
None.
2.13. How does this specification distinguish between behavior in first-party and third-party contexts?
No change from existing behavior.
2.14. How do the features in this specification work in the context of a browser’s Private Browsing or Incognito mode?
No change from existing behavior.
2.15. Does this specification have both "Security Considerations" and "Privacy Considerations" sections?
Yes.
2.16. Do features in your specification enable origins to downgrade default security protections?
No.
2.17. How does your feature handle non-"fully active" documents?
No change from existing behavior.
2.18. What should this questionnaire have asked?
Nothing comes to mind.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: N/A
  • The group where the work on this specification is currently being done: CSSWG
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue): CSSWG
  • Major unresolved issues with or opposition to this specification: There are still debates around syntax, but it seems to mostly be falling into place.
  • This work is being funded by: N/A

We'd prefer the TAG provide feedback as (please delete all but the desired option):

💬 leave review feedback as a comment in this issue and @-notify @sesse and @lilles

Discussions

Comment by @LeaVerou Dec 19, 2022 (See Github)

Hi there, given that there is an ongoing survey out to web developers about potentially changing the syntax again, is this a good time for TAG review?

Comment by @torgo Jan 4, 2023 (See Github)

Hi @sesse - thanks for this. When something is being worked on in an existing w3c working group we generally like that group to be participating in the review and to have had a voice in requesting that review. @atanassov @astearns as co-chairs of the CSS wg, in your view is this ready for TAG review? Is there consensus in the wg to request a review at this time?

Comment by @astearns Jan 6, 2023 (See Github)

@torgo we already have TAG members participating in the debate over syntax :)

Given the difficulties we have had around resolving the syntax questions, I think it might be good to give more of the TAG input into the debate sooner rather than later. Waiting for a TAG review until we have finally landed on some kind of consensus will likely limit the TAG’s influence on the syntax itself.

Comment by @cynthia Feb 14, 2023 (See Github)

After discussing this in our vF2F (as a non-CSS person) - I'm super confused. It looks like the "explainer" (which is a blog post) is quite outdated, and I wasn't able to provide an informed opinion on this.

Comment by @jensimmons Mar 8, 2023 (See Github)

The CSS specification is at https://drafts.csswg.org/css-nesting/

A simple author-centric explanation of how the current proposal for CSS Nesting will work is at https://webkit.org/blog/13813/try-css-nesting-today-in-safari-technology-preview/

The blog post labeled "Explainer" in the original post above was written from March 2019. It is incredibly out of date and should be disregarded.

Discussed Oct 9, 2023 (See Github)

Peter: we deferred this because it was in flux.. do we think it's stable enough to review?

Lea: no. There are still a lot of outstanding issues. One of the most important ones imo that may affect what we think is .. the main problem was the implicit & and when authors would be allowed to omit the &. This evolved in a favourable direction towards the syntax that is easier for authors but more annoying for implementers. But right now there is another issue about ordering but I don't know if it's our place to comment on these things, we don't need to go hunting down issues.

Peter: how much is architectural vs details of css implementation?

Lea: exactly. Post to ask if it's time for us to review or if it's still in flux?

Rossen: +1

Hi there, sorry for the delay in following up on this. Is this ready for us to resume review? If so, could we please have an explainer that is up to date with the current syntax for this proposal and any major outstanding issues? Thank you!
Comment by @rhiaro Oct 9, 2023 (See Github)

Hi there, sorry for the delay in following up on this. Is this ready for us to resume review? If so, could we please have an explainer that is up to date with the current syntax for this proposal and any major outstanding issues? Thank you!

Comment by @tabatkins Oct 9, 2023 (See Github)

Yes, it's ready. I've lightly modified the WebKit blogpost that Jen pointed to (as it's also now slightly out of date) and folded it into the spec, at https://drafts.csswg.org/css-nesting/#explainer. (Give the spec a few minutes after I post this comment to regenerate.)

Comment by @jensimmons Oct 10, 2023 (See Github)

Oh, we should more heavily rewrite what was published on webkit.org back in March. That's significantly out of date now, too, since the requirement to start a nested element selector with a symbol is changed.

I wrote a more recent article which explains the update at https://webkit.org/blog/14571/css-nesting-and-the-cascade/

Comment by @plinss Oct 11, 2023 (See Github)

That's helpful, but doesn't really satisfy what we're looking for in an explainer. In particular, we're also looking for user needs and alternatives considered. (Note that this isn't just for the TAG, but we also do want to get TAG members who aren't in the CSSWG involved and it's helpful if they don't have to wade through all the discussions or get a potentially biased dump from others.)

Comment by @LeaVerou Dec 18, 2023 (See Github)

Hey there, We see that the syntax debate has settled and implicit & is shipping everywhere. We were wondering if we should just close this, or if we could still be useful by weighing in on some of the high level remaining issues.

Discussed Feb 5, 2024 (See Github)

Yves: should close

Peter: agree. As good as it's going to get. Would like to have Lea sign off.

Yves: Lea's latest comment was to ask if they have remaining issues. I'd say we've done our job, they can file new issues. We can invite them to file additional issues as appropriate.

Peter: there's a CSS f2f, so expect remaining issues to be resolved soon. Good to close.

Lea: happy about how this went

<blockquote> We're closing this review as satisfied, glad to see the major issues resolved. If the CSSWG needs feedback about any of the remaining issues please file new requests. </blockquote>

closed

Comment by @plinss Feb 5, 2024 (See Github)

We're closing this review as satisfied, glad to see the major issues resolved. If the CSSWG needs feedback about any of the remaining issues please file new requests.