Skip to content

Commit 4912191

Browse files
committed
[css-nesting] adds 2 3 level nest examples
1 parent c7793d9 commit 4912191

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

css-nesting-1/Overview.bs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,33 @@ Direct Nesting {#direct}
238238
}
239239
/* equivalent to
240240
.foo:is(.bar, .foo:is(.baz)) { color: red; }
241+
main {
242+
display: grid;
243+
& > section {
244+
background: white;
245+
& > header {
246+
font-size: 1.25rem;
247+
}
248+
}
249+
}
250+
/* equivalent to
251+
main { display: grid; }
252+
main > section { background: white; }
253+
main > section > header { font-size: 1.25rem; }
254+
*/
255+
256+
main {
257+
& > section,
258+
& > article {
259+
background: white;
260+
& > header {
261+
font-size: 1.25rem;
262+
}
263+
}
264+
}
265+
/* equivalent to
266+
main > :is(section, article) { background: white; }
267+
main > :is(section, article) > header { font-size: 1.25rem; }
241268
*/
242269
</pre>
243270

0 commit comments

Comments
 (0)