Skip to content

Commit 349a54a

Browse files
committed
[css-nesting-1] Clarify specificity of relative nested selectors. #9069
1 parent 3636cc7 commit 349a54a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

css-nesting-1/Overview.bs

+14-1
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,11 @@ Syntax {#syntax}
292292
along with its contents,
293293
but does not invalidate its parent rule.
294294

295+
Nested rules with [=relative selectors=]
296+
include the specificity of their implied [=nesting selector=].
297+
For example, ''.foo { > .bar {...}}'' and ''.foo { & > .bar {...}}''
298+
have the same specificity for their inner rule.
299+
295300
<div class=note>
296301
Some CSS-generating tools that preprocess nesting
297302
will concatenate selectors as strings,
@@ -358,7 +363,15 @@ Syntax {#syntax}
358363
when we move ''&'' itself to Selectors;
359364
I'm monkey-patching for convenience here.
360365

361-
<!-- Big Text: example -->
366+
<!--
367+
████████ ██ ██ ███ ██ ██ ████████ ██ ████████
368+
██ ██ ██ ██ ██ ███ ███ ██ ██ ██ ██
369+
██ ██ ██ ██ ██ ████ ████ ██ ██ ██ ██
370+
██████ ███ ██ ██ ██ ███ ██ ████████ ██ ██████
371+
██ ██ ██ █████████ ██ ██ ██ ██ ██
372+
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
373+
████████ ██ ██ ██ ██ ██ ██ ██ ████████ ████████
374+
-->
362375

363376
<h3 id=syntax-examples>
364377
Examples</h3>

0 commit comments

Comments
 (0)