Skip to content

Commit 2a16dbc

Browse files
committed
[css-pseudo] Define part-like pseudo-element. #10083
1 parent 73d754d commit 2a16dbc

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

css-pseudo-4/Overview.bs

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,20 @@ Tree-Abiding Pseudo-elements</h2>
11471147
non-inheritable properties take their <a>initial values</a> as usual.
11481148
[[CSS-CASCADE-4]]
11491149

1150+
<h3 id=partlike>
1151+
Part-Like Pseudo-Elements</h3>
1152+
1153+
A subset of [=tree-abiding pseudo-elements=],
1154+
the <dfn>part-like pseudo-elements</dfn>,
1155+
have slightly stronger requirements:
1156+
they act as if they have a well-defined location in the document tree.
1157+
This enables them to interact with some other platform features
1158+
as if they were real elements.
1159+
1160+
Unless otherwise specified,
1161+
any CSS property that applies to elements
1162+
applies to [=part-like pseudo-elements=].
1163+
11501164
<h3 id="generated-content">
11511165
Generated Content Pseudo-elements: ''::before'' and ''::after''</h3>
11521166

@@ -1165,10 +1179,9 @@ Generated Content Pseudo-elements: ''::before'' and ''::after''</h3>
11651179
immediately after the <a>originating element</a>'s actual content.
11661180
</dl>
11671181

1168-
These pseudo-elements can be styled
1169-
exactly like any normal document-sourced element in the document tree;
1170-
all properties that apply to a normal element
1171-
likewise apply to ''::before'' and ''::after''.
1182+
Both ''::before'' and ''::after''
1183+
are [=part-like pseudo-elements=];
1184+
there is no restriction on what properties apply to them.
11721185

11731186
<div class="example">
11741187
For example, the following rule inserts the string “Note: ”
@@ -1206,7 +1219,9 @@ List Markers: the ''::marker'' pseudo-element</h3>
12061219

12071220
ISSUE: Interaction of ''::marker'' and ''::first-line'' is currently under discussion in <a href='https://github.com/w3c/csswg-drafts/issues/4506'>Issue 4506</a>.
12081221

1209-
Only a limited set of properties can be used on the ''::marker'' pseudo-element.
1222+
''::marker'' is a [=tree-abiding pseudo-element=],
1223+
but not [=part-like pseudo-element|part-like=];
1224+
only a limited set of properties can be used on the ''::marker'' pseudo-element.
12101225
This list is defined in [[css-lists-3#marker-properties]].
12111226

12121227
The ''::before::marker'' or ''::after::marker'' selectors
@@ -1229,6 +1244,7 @@ Placeholder Input: the ''::placeholder'' pseudo-element</h3>
12291244
For example, a date-input field
12301245
might have the placeholder text “YYYY/MM/DD”
12311246
to clarify that numeric dates are to be entered in year-month-day order.
1247+
It is a [=tree-abiding pseudo-element=].
12321248

12331249
<div class="example">
12341250
For example, according to the semantics of [[HTML]]
@@ -1266,9 +1282,11 @@ Placeholder Input: the ''::placeholder'' pseudo-element</h3>
12661282
<h3 id="file-selector-button-pseudo">
12671283
File Selector Button: the ''::file-selector-button'' pseudo-element</h3>
12681284

1269-
The <dfn>::file-selector-button</dfn> pseudo-element targets the ''&lt;button>''
1270-
inside an ''&lt;input>'' element with <code>type=file</code>, if the UA
1271-
renders such a button.
1285+
The <dfn>::file-selector-button</dfn> pseudo-element
1286+
targets the ''&lt;button>''
1287+
inside an ''&lt;input>'' element with <code>type=file</code>,
1288+
if the UA renders such a button.
1289+
It is a [=part-like pseudo-element=].
12721290

12731291
There is no restriction on which properties apply to the
12741292
''::file-selector-button'' pseudo-element.

0 commit comments

Comments
 (0)