File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ module.exports = plugin.withOptions(
117
117
[ 'video' ] ,
118
118
[ 'hr' ] ,
119
119
] ) {
120
- addVariant ( `${ className } -${ name } ` , `& :is(${ inWhere ( selector , options ) } )` )
120
+ addVariant ( `${ className } -${ name } ` , target === 'legacy' ? `& ${ selector } ` : `& :is(${ inWhere ( selector , options ) } )` )
121
121
}
122
122
123
123
addComponents (
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ test('modifiers', async () => {
335
335
test ( 'legacy target' , async ( ) => {
336
336
let config = {
337
337
plugins : [ typographyPlugin ( { target : 'legacy' } ) ] ,
338
- content : [ { raw : html `<div class= "prose" > </ div> ` } ] ,
338
+ content : [ { raw : html `<div class= "prose prose-h1:text-center " > </ div> ` } ] ,
339
339
theme : {
340
340
typography : {
341
341
DEFAULT : {
@@ -423,6 +423,9 @@ test('legacy target', async () => {
423
423
.prose code ::after {
424
424
content : '`' ;
425
425
}
426
+ .prose-h1\:text-center h1 {
427
+ text-align : center;
428
+ }
426
429
`
427
430
)
428
431
} )
You can’t perform that action at this time.
0 commit comments