Skip to content

Commit d8475aa

Browse files
authored
Clarify empty declaration block only applies to 4.iii
1 parent 327a873 commit d8475aa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

css-nesting-1/proposals.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To organize the discussion a bit, the options we're looking at are:
1212
3. [Non-letter start proposal](https://github.com/w3c/csswg-drafts/issues/7834#issuecomment-1272373216) - No parsing switch, instead every nested rule has to be unambiguous on its own, by starting with anything but an ident. (You can write `& div` or `:is(div)` if you need to start a selector with a type selector.) (This employs the same parsing strat as (2.iii) to avoid accidentally parsing invalid properties like `//color: red;` as rules.)
1313
4. [Postfix proposal](https://github.com/w3c/csswg-drafts/issues/7834#issuecomment-1276360012) - Block after main rule containing nested rules, no `&` needed in nested selectors except for disambiguation. Style rules effectively consist of a selector, a declaration block, and an optional style rule block.
1414
1. Could add the rule block with an `@nest` rule
15-
2. Could add the rule block with special ASCII selector like bare `&` or `&&` to indicate association of nested rules with the previous selector
15+
2. Could add the rule block with special ASCII selector (e.g. `&&`) to indicate association of nested rules with the previous selector
1616
3. Could [add the rule block with bare braces](https://github.com/w3c/csswg-drafts/issues/7834#issuecomment-1282630354), essentially giving the selector prelude associated two blocks (one declaration block, one optional rule block).
1717

1818
------
@@ -107,7 +107,7 @@ Arguments for each of the above options:
107107
- Requires either noisy `@nest` everywhere or cryptic ASCII syntax
108108
- CSSOM with (arguably) a different structure than the syntax
109109
- Can't mix properties and rules - all properties have to come first. (But this matches the data model anyway.)
110-
- If you are *only* nesting rules, you still need an empty declaration block (`{}`), which looks awkward
110+
- If you are *only* nesting rules, and we are using bare parens (4.iii) you still need an empty declaration block (`{}`), which looks awkward
111111

112112
</table>
113113

@@ -155,7 +155,6 @@ If it were up to you, what syntax would you prefer for CSS Nesting?
155155
| ydaniv | 4.iii or 4.ii | 1 | 3 |
156156
| andruud | 3 | 1 | 4 |
157157
| valtlai | 3 | 1 | 2.iii |
158-
| jensimmons | 4 | 3 | |
159158

160159
***Note:** It is not required to be a WG member to add your name to this list,
161160
only to have followed the [discussion](https://github.com/w3c/csswg-drafts/issues/7834)

0 commit comments

Comments
 (0)