File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 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(
117117 [ 'video' ] ,
118118 [ 'hr' ] ,
119119 ] ) {
120- addVariant ( `${ className } -${ name } ` , `& :is(${ inWhere ( selector , options ) } )` )
120+ addVariant ( `${ className } -${ name } ` , target === 'legacy' ? `& ${ selector } ` : `& :is(${ inWhere ( selector , options ) } )` )
121121 }
122122
123123 addComponents (
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ test('modifiers', async () => {
335335test ( 'legacy target' , async ( ) => {
336336 let config = {
337337 plugins : [ typographyPlugin ( { target : 'legacy' } ) ] ,
338- content : [ { raw : html `<div class= "prose" > </ div> ` } ] ,
338+ content : [ { raw : html `<div class= "prose prose-h1:text-center " > </ div> ` } ] ,
339339 theme : {
340340 typography : {
341341 DEFAULT : {
@@ -423,6 +423,9 @@ test('legacy target', async () => {
423423 .prose code ::after {
424424 content : '`' ;
425425 }
426+ .prose-h1\:text-center h1 {
427+ text-align : center;
428+ }
426429 `
427430 )
428431 } )
You can’t perform that action at this time.
0 commit comments