@@ -10,19 +10,19 @@ const computed = {
10
10
// bulletColor: (color) => ({ 'ul > li::before': { backgroundColor: color } }),
11
11
}
12
12
13
- function inWhere ( selector ) {
13
+ function inWhere ( selector , className ) {
14
14
if ( selector . endsWith ( '::before' ) ) {
15
- return `:where(${ selector . slice ( 0 , - 8 ) } )::before`
15
+ return `:where(${ selector . slice ( 0 , - 8 ) } ):not(:where(.not- ${ className } *)): :before`
16
16
}
17
17
18
18
if ( selector . endsWith ( '::after' ) ) {
19
- return `:where(${ selector . slice ( 0 , - 7 ) } )::after`
19
+ return `:where(${ selector . slice ( 0 , - 7 ) } ):not(:where(.not- ${ className } *)): :after`
20
20
}
21
21
22
- return `:where(${ selector } )`
22
+ return `:where(${ selector } ):not(:where(.not- ${ className } *)) `
23
23
}
24
24
25
- function configToCss ( config = { } , target ) {
25
+ function configToCss ( config = { } , { target, className } ) {
26
26
return Object . fromEntries (
27
27
Object . entries (
28
28
merge (
@@ -38,7 +38,7 @@ function configToCss(config = {}, target) {
38
38
}
39
39
40
40
if ( typeof v == 'object' && v . constructor == Object ) {
41
- return [ inWhere ( k ) , v ]
41
+ return [ inWhere ( k , className ) , v ]
42
42
}
43
43
44
44
return [ k , v ]
@@ -74,7 +74,7 @@ module.exports = plugin.withOptions(
74
74
all . map ( ( modifier ) => ( {
75
75
[ modifier === 'DEFAULT' ? `.${ className } ` : `.${ className } -${ modifier } ` ] : configToCss (
76
76
config [ modifier ] ,
77
- target ,
77
+ { target, className } ,
78
78
) ,
79
79
} ) ) ,
80
80
variants ( 'typography' )
0 commit comments