Skip to content

Commit 228ec4f

Browse files
committed
[css-cascade-3] Add note about applies-to on pseudo-elements; dfn applies-to #1861"
1 parent 06d9422 commit 228ec4f

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

css-cascade-3/Overview.bs

+13-1
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,26 @@ Used Values</h3>
442442
As another example, a <code>&lt;div></code> might have a computed 'break-before' value of ''auto'',
443443
but acquire a used 'break-before' value of ''break-before/page'' by propagation from its first child. [[css-break-3]]
444444

445-
If the property does not apply to this element or box type
445+
If the property does not <dfn lt="apply to | applies to">apply to</dfn>
446+
this element or box type
446447
(as defined by its “Applies To” line),
447448
then it has no <a>used value</a> for that property.
448449

449450
<p class='example'>
450451
For example, the 'flex' property has no <a>used value</a>
451452
on elements that aren't <a>flex items</a>.
452453

454+
Note: A property defined to apply to “all elements”
455+
applies to all elements and [=display types=],
456+
but not necessarily to all [=pseudo-element=] types,
457+
since pseudo-elements often have their own specific rendering models
458+
or other restrictions.
459+
The ''::before'' and ''::after'' pseudo-elements, however,
460+
are defined to generate boxes almost exactly like normal elements
461+
and are therefore defined accept all properties that apply to “all elements”.
462+
See [[CSS-PSEUDO-4]]
463+
for more information about [=pseudo-elements=].
464+
453465
<h3 id="actual">
454466
Actual Values</h3>
455467

css-cascade-4/Overview.bs

+13-1
Original file line numberDiff line numberDiff line change
@@ -556,14 +556,26 @@ Used Values</h3>
556556
As another example, a <code>&lt;div></code> might have a computed 'break-before' value of ''auto'',
557557
but acquire a used 'break-before' value of ''break-before/page'' by propagation from its first child. [[css-break-3]]
558558

559-
If the property does not apply to this element or box type
559+
If the property does not <dfn lt="apply to | applies to">apply to</dfn>
560+
this element or box type
560561
(as defined by its “Applies To” line),
561562
then it has no <a>used value</a> for that property.
562563

563564
<p class='example'>
564565
For example, the 'flex' property has no <a>used value</a>
565566
on elements that aren't <a>flex items</a>.
566567

568+
Note: A property defined to apply to “all elements”
569+
applies to all elements and [=display types=],
570+
but not necessarily to all [=pseudo-element=] types,
571+
since pseudo-elements often have their own specific rendering models
572+
or other restrictions.
573+
The ''::before'' and ''::after'' pseudo-elements, however,
574+
are defined to generate boxes almost exactly like normal elements
575+
and are therefore defined accept all properties that apply to “all elements”.
576+
See [[CSS-PSEUDO-4]]
577+
for more information about [=pseudo-elements=].
578+
567579
<h3 id="actual">
568580
Actual Values</h3>
569581

0 commit comments

Comments
 (0)