Skip to content

Commit 2c0772a

Browse files
committed
[css-pseudo-4] Move part-like pseudo-elements chapter
1 parent 9481e21 commit 2c0772a

File tree

1 file changed

+48
-47
lines changed

1 file changed

+48
-47
lines changed

css-pseudo-4/Overview.bs

+48-47
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ Security Considerations for Highlighting</h3>
13621362
the styling of such highlighted segments.
13631363

13641364
<h2 id="treelike">
1365-
Tree-Abiding and Part-Like Pseudo-elements</h2>
1365+
Tree-Abiding Pseudo-elements</h2>
13661366

13671367
<dfn export lt="tree-abiding|tree-abiding pseudo-element">Tree-abiding pseudo-elements</dfn> always fit within the box tree.
13681368
They <a lt="inheritance">inherit</a> any inheritable properties from their <a>originating element</a>;
@@ -1373,52 +1373,6 @@ Tree-Abiding and Part-Like Pseudo-elements</h2>
13731373
parsing/tree-abiding-pseudo-elements.html
13741374
</wpt>
13751375

1376-
<h3 id=partlike>
1377-
Part-Like Pseudo-Elements</h3>
1378-
1379-
A subset of [=tree-abiding pseudo-elements=],
1380-
the <dfn export lt="part-like|part-like pseudo-element">part-like pseudo-elements</dfn>,
1381-
have slightly stronger requirements:
1382-
they act as if they have a well-defined location in the document tree.
1383-
This enables them to interact with some other platform features
1384-
as if they were real elements
1385-
(and, in fact, they often <em>are</em> real elements,
1386-
such as in the case of ''::part()'',
1387-
which simply aren't accessible in the current tree).
1388-
1389-
[=Part-like pseudo-elements=] inherit from their [=originating element=] by default,
1390-
like a standard [=tree-abiding pseudo-element=],
1391-
but can declare that they inherit from another element instead
1392-
(possibly not accessible).
1393-
(For example, ''::part()'' inherits from
1394-
the parent of the element it represents in the shadow tree.)
1395-
1396-
All pseudo-classes and pseudo-elements
1397-
are syntactically allowed after a [=part-like pseudo-element=],
1398-
such as ''x-button::part(label):hover''
1399-
or ''x-button::part(label)::before'',
1400-
but some are disallowed from matching:
1401-
1402-
* The [=structural pseudo-classes=],
1403-
'':has()'' pseudo-class,
1404-
'':scope'' pseudo-class,
1405-
and '':host''/'':host()''/'':host-context()'' pseudo-classes
1406-
never match.
1407-
* ''::part()'' never matches. (Other [=part-like pseudo-elements=] can, however.)
1408-
1409-
A [=part-like pseudo-element=] can define itself as representing a real element
1410-
(possibly not accessible in the current tree).
1411-
If it does so, all pseudo-classes and pseudo-elements match according to that element,
1412-
if not disallowed by the previous restrictions.
1413-
If it does not do so,
1414-
it must define which pseudo-classes it matches and when
1415-
(besides the pseudo-classes defined to work on all pseudo-elements,
1416-
or all [=tree-abiding pseudo-elements=]).
1417-
1418-
Unless otherwise specified,
1419-
any CSS property that applies to elements
1420-
applies to [=part-like pseudo-elements=].
1421-
14221376
<h3 id="generated-content">
14231377
Generated Content Pseudo-elements: ''::before'' and ''::after''</h3>
14241378

@@ -1624,6 +1578,53 @@ Placeholder Input: the ''::placeholder'' pseudo-element</h3>
16241578
It's not clear how this should work, but it may be worth doing.
16251579
See <a href="https://github.com/w3c/csswg-drafts/issues/2517">Issue 2417</a>.
16261580

1581+
<h2 id=partlike>
1582+
Part-Like Pseudo-Elements</h2>
1583+
1584+
A subset of [=tree-abiding pseudo-elements=],
1585+
the <dfn export lt="part-like|part-like pseudo-element">part-like pseudo-elements</dfn>,
1586+
have slightly stronger requirements:
1587+
they act as if they have a well-defined location in the document tree.
1588+
This enables them to interact with some other platform features
1589+
as if they were real elements
1590+
(and, in fact, they often <em>are</em> real elements,
1591+
such as in the case of ''::part()'',
1592+
which simply aren't accessible in the current tree).
1593+
1594+
[=Part-like pseudo-elements=] inherit from their [=originating element=] by default,
1595+
like a standard [=tree-abiding pseudo-element=],
1596+
but can declare that they inherit from another element instead
1597+
(possibly not accessible).
1598+
(For example, ''::part()'' inherits from
1599+
the parent of the element it represents in the shadow tree.)
1600+
1601+
All pseudo-classes and pseudo-elements
1602+
are syntactically allowed after a [=part-like pseudo-element=],
1603+
such as ''x-button::part(label):hover''
1604+
or ''x-button::part(label)::before'',
1605+
but some are disallowed from matching:
1606+
1607+
* The [=structural pseudo-classes=],
1608+
'':has()'' pseudo-class,
1609+
'':scope'' pseudo-class,
1610+
and '':host''/'':host()''/'':host-context()'' pseudo-classes
1611+
never match.
1612+
* ''::part()'' never matches. (Other [=part-like pseudo-elements=] can, however.)
1613+
1614+
A [=part-like pseudo-element=] can define itself as representing a real element
1615+
(possibly not accessible in the current tree).
1616+
If it does so, all pseudo-classes and pseudo-elements match according to that element,
1617+
if not disallowed by the previous restrictions.
1618+
If it does not do so,
1619+
it must define which pseudo-classes it matches and when
1620+
(besides the pseudo-classes defined to work on all pseudo-elements,
1621+
or all [=tree-abiding pseudo-elements=]).
1622+
1623+
Unless otherwise specified,
1624+
any CSS property that applies to elements
1625+
applies to [=part-like pseudo-elements=].
1626+
1627+
16271628
<h3 id="file-selector-button-pseudo">
16281629
File Selector Button: the ''::file-selector-button'' pseudo-element</h3>
16291630

0 commit comments

Comments
 (0)