@@ -25,6 +25,7 @@ Abstract: This specification describes user interface related
25
25
from the properties and values of previous CSS levels.
26
26
It uses various properties and values
27
27
to style basic user interface elements in a document.
28
+ At risk : Applicability of 'user-select' to ''::before'' and ''::after''
28
29
</pre>
29
30
30
31
<h2 id="intro">Introduction</h2>
@@ -590,16 +591,35 @@ Omitted values are set to their initial values.
590
591
Value : auto | text | none | contain | all
591
592
Initial : auto
592
593
Inherited : no
593
- Applies to : all elements
594
+ Applies to : all elements, and optionally to the ''::before'' and ''::after'' pseudo elements
594
595
Media : interactive
595
596
Computed value : See below
596
597
</pre>
597
598
598
599
User Agents must not apply the 'user-select' property to
599
600
the ''::first-line'' and ''::first-letter'' pseudo elements.
600
601
601
- Issue: Whether 'user-select' should apply to ''::before'' and
602
- ''::after'' is an open question.
602
+ Note: The UA may apply this property to the ''::before'' and ''::after'' pseudo elements.
603
+ If it does, ''user-select/auto'' value computes to ''user-select/none'' on these pseudos,
604
+ but other values can be specified.
605
+ This preserves the legacy behavior of generated content not being selectable or copyable,
606
+ which is appropriate when these pseudos are used for decorative purposes.
607
+ However, this property allows them to become selectable and copyable,
608
+ as the user would expect in cases where they are used to generate part of the content,
609
+ such as the issue numbers in this document.
610
+ <strong class="advisement"> To the extent possible,
611
+ authors should avoid using generated content
612
+ for non decorative purposes,
613
+ and should prefer including all the content in the DOM.</strong>
614
+ <em> This feature is at risk.</em>
615
+
616
+ When generated content in pseudo elements becomes selectable
617
+ through this mechanism,
618
+ UAs should also make this content findable through their search function.
619
+
620
+ Issue: Should it also apply to ''::marker'' ? To <a>page-margin boxes</a> ?
621
+ Should the computed value of '''user-select/auto'' also be ''user-select/none'' ,
622
+ or would ''user-select/text'' be more appropriate?
603
623
604
624
The computed value is the specified value,
605
625
except:
@@ -628,6 +648,8 @@ Omitted values are set to their initial values.
628
648
<dt> <dfn>auto</dfn>
629
649
<dd> The computed value of ''user-select/auto'' is determined as follows:
630
650
<ul>
651
+ <li> On the ''::before'' and ''::after'' pseudo elements,
652
+ the computed value is ''user-select/none''
631
653
<li> If the element is an <a>editable element</a> ,
632
654
the computed value is ''contain''
633
655
<li> Otherwise,
0 commit comments