[css-nesting-1] Syntax Invites Errors 路 Issue #7834 路 w3c/csswg-drafts (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Edit: 馃憠馃徏 UPDATED SUMMARY TABLE OF SYNTAX PROPOSALS 馃憟馃徏 (from #7834 (comment) )
As mentioned in #7796, there are some problems with the currently-proposed nesting syntax:
- selectors within nested context are incompatible with those outside of nested context, and with syntax within
@scope
, which invites a lot of copy-paste errors when transferring code among these contexts - the requirement to include
&
within all the selectors in a list even beyond syntactic 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). &.foo
and& .foo
are easily confusable (both for reading and for typing), and so long as the latter is required for nested relative selectors this will be a commonly encountered problem