From 2a16dbc4a2a2a5ee5bc01e47e8bb2b4766221cdc Mon Sep 17 00:00:00 2001
From: Tab Atkins-Bittner
+ You can style my ::before pseudo-element
+ by using ::part(preceding-text), too!
+
+Part-Like Pseudo-Elements
+
+ A subset of [=tree-abiding pseudo-elements=],
+ the part-like pseudo-elements,
+ have slightly stronger requirements:
+ they act as if they have a well-defined location in the document tree.
+ This enables them to interact with some other platform features
+ as if they were real elements.
+
+ Unless otherwise specified,
+ any CSS property that applies to elements
+ applies to [=part-like pseudo-elements=].
+
Generated Content Pseudo-elements: ''::before'' and ''::after''
@@ -1165,10 +1179,9 @@ Generated Content Pseudo-elements: ''::before'' and ''::after''
immediately after the originating element's actual content.
- These pseudo-elements can be styled
- exactly like any normal document-sourced element in the document tree;
- all properties that apply to a normal element
- likewise apply to ''::before'' and ''::after''.
+ Both ''::before'' and ''::after''
+ are [=part-like pseudo-elements=];
+ there is no restriction on what properties apply to them.
File Selector Button: the ''::file-selector-button'' pseudo-element
- The ::file-selector-button pseudo-element targets the ''<button>''
- inside an ''<input>'' element with type=file, if the UA
- renders such a button.
+ The ::file-selector-button pseudo-element
+ targets the ''<button>''
+ inside an ''<input>'' element with type=file,
+ if the UA renders such a button.
+ It is a [=part-like pseudo-element=].
There is no restriction on which properties apply to the
''::file-selector-button'' pseudo-element.
From d0f0f42dae006e9f3cd45b87fc10406d232c7314 Mon Sep 17 00:00:00 2001
From: Tab Atkins-Bittner
-Tree-Abiding Pseudo-elements
+Tree-Abiding and Part-Like Pseudo-elements
Tree-abiding pseudo-elements always fit within the box tree.
They inherit any inheritable properties from their originating element;
non-inheritable properties take their initial values as usual.
[[CSS-CASCADE-4]]
-
-Part-Like Pseudo-Elements
-
A subset of [=tree-abiding pseudo-elements=],
the part-like pseudo-elements,
have slightly stronger requirements:
@@ -1157,6 +1154,21 @@ Part-Like Pseudo-Elements
This enables them to interact with some other platform features
as if they were real elements.
+