Skip to content

Commit f2971e7

Browse files
committed
[selectors-4] Tweak pseudo-elements intro text, restore some background info on the one-colon exception (lost in <https://hg.csswg.org/drafts/diff/8e32bf889326/selectors/Overview.bs>), revert normative requirement on authors to use two-colon syntax and mark it as an issue for discussion (since it was, afaict, never discussed, just rolled into an editorial checkin).
1 parent 3d998fa commit f2971e7

1 file changed

Lines changed: 19 additions & 10 deletions

File tree

selectors/Overview.bs

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -741,12 +741,11 @@ Pseudo-classes</h3>
741741

742742
<h3 id="pseudo-elements">Pseudo-elements</h3>
743743

744-
Similar to how <a>pseudo-classes</a> represent additional information
745-
not directly present in the document tree
746-
(or that is inconvenient to use),
747-
a <dfn export>pseudo-element</dfn> is an <em>element</em>
744+
Similar to how certain <a>pseudo-classes</a> represent additional state information
748745
not directly present in the document tree,
749-
used to create abstractions about the document tree
746+
a <dfn export>pseudo-element</dfn> represents an <em>element</em>
747+
not directly present in the document tree.
748+
They are used to create abstractions about the document tree
750749
beyond those specified by the document language.
751750

752751
<div class="example">
@@ -767,11 +766,21 @@ Pseudo-classes</h3>
767766
<a>Pseudo-element</a> names are <a>ASCII case-insensitive</a>.
768767
No <a>white space</a> is allowed between the two colons, or between the colons and the name.
769768

770-
Due to legacy constraints,
771-
user agents must allow ''::before'', ''::after'', ''::first-line'', and ''::first-letter'' pseudo-elements
772-
to be written with a single colon rather than two,
773-
similar to <a>pseudo-class</a> syntax.
774-
Authors must always use the double-colon syntax for these <a>pseudo-elements</a>.
769+
Because <a href="http://www.w3.org/TR/CSS1">CSS Level 1</a> and <a href="http://www.w3.org/TR/CSS2">CSS Level 2</a>
770+
conflated pseudo-elements and pseudo-classes by sharing a single-colon syntax for both,
771+
user agents must also accept the previous one-colon notation
772+
for the Level 1 &amp; 2 pseudo-elements
773+
(''::before'', ''::after'', ''::first-line'', and ''::first-letter'').
774+
This compatibility notation is not allowed any other <a>pseudo-elements</a>.
775+
776+
Issue:
777+
<a href="https://hg.csswg.org/drafts/diff/8e32bf889326/selectors/Overview.bs">Tab proposes</a>
778+
deprecating the old syntax and RECOMMENDing that authors not use it.
779+
780+
<!--
781+
However, as this syntax is deprecated,
782+
authors should use the Level 3+ double-colon syntax for these <a>pseudo-elements</a>.
783+
-->
775784

776785
<a>Pseudo-elements</a> do not exist independently;
777786
they belong to another element on the page,

0 commit comments

Comments
 (0)