19
19
// **Jumpable**
20
20
// Any terminal element may "jump" over combinators when moving to the end of the selector
21
21
//
22
- // This is a backwards-compat quirk of :before and :after variants.
22
+ // This is a backwards-compat quirk of pseudo element variants from earlier versions of Tailwind CSS .
23
23
24
24
/** @typedef {'terminal' | 'actionable' | 'jumpable' } PseudoProperty */
25
25
26
26
/** @type {Record<string, PseudoProperty[]> } */
27
27
let elementProperties = {
28
+ // Pseudo elements from the spec
28
29
'::after' : [ 'terminal' , 'jumpable' ] ,
29
30
'::backdrop' : [ 'terminal' , 'jumpable' ] ,
30
31
'::before' : [ 'terminal' , 'jumpable' ] ,
@@ -41,18 +42,14 @@ let elementProperties = {
41
42
'::spelling-error' : [ 'terminal' ] ,
42
43
'::target-text' : [ 'terminal' ] ,
43
44
44
- // other
45
+ // Pseudo elements from the spec with special rules
45
46
'::file-selector-button' : [ 'terminal' , 'actionable' ] ,
46
- '::-webkit-progress-bar' : [ 'terminal' , 'actionable' ] ,
47
47
48
- // Webkit scroll bar pseudo elements can be combined with user-action pseudo classes
49
- '::-webkit-scrollbar' : [ 'terminal' , 'actionable' ] ,
50
- '::-webkit-scrollbar-button' : [ 'terminal' , 'actionable' ] ,
51
- '::-webkit-scrollbar-thumb' : [ 'terminal' , 'actionable' ] ,
52
- '::-webkit-scrollbar-track' : [ 'terminal' , 'actionable' ] ,
53
- '::-webkit-scrollbar-track-piece' : [ 'terminal' , 'actionable' ] ,
54
- '::-webkit-scrollbar-corner' : [ 'terminal' , 'actionable' ] ,
55
- '::-webkit-resizer' : [ 'terminal' , 'actionable' ] ,
48
+ // Library-specific pseudo elements used by component libraries
49
+ // These are Shadow DOM-like
50
+ '::deep' : [ 'actionable' ] ,
51
+ '::v-deep' : [ 'actionable' ] ,
52
+ '::ng-deep' : [ 'actionable' ] ,
56
53
57
54
// Note: As a rule, double colons (::) should be used instead of a single colon
58
55
// (:). This distinguishes pseudo-classes from pseudo-elements. However, since
@@ -65,8 +62,8 @@ let elementProperties = {
65
62
66
63
// The default value is used when the pseudo-element is not recognized
67
64
// Because it's not recognized, we don't know if it's terminal or not
68
- // So we assume it can't be moved AND can have user-action pseudo classes attached to it
69
- __default__ : [ 'actionable' ] ,
65
+ // So we assume it can be moved AND can have user-action pseudo classes attached to it
66
+ __default__ : [ 'terminal' , ' actionable'] ,
70
67
}
71
68
72
69
/**
0 commit comments