File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,39 @@ describe('custom advanced variants', () => {
134134 ` )
135135 } )
136136 } )
137+
138+ test ( 'using variants with multi-class selectors' , ( ) => {
139+ let config = {
140+ content : [
141+ {
142+ raw : html ` <div class= "screen:parent screen:child" > </ div> ` ,
143+ } ,
144+ ] ,
145+ plugins : [
146+ function ( { addVariant, addComponents } ) {
147+ addComponents ( {
148+ '.parent .child' : {
149+ foo : 'bar' ,
150+ } ,
151+ } )
152+ addVariant ( 'screen' , '@media screen' )
153+ } ,
154+ ] ,
155+ }
156+
157+ return run ( '@tailwind components;@tailwind utilities' , config ) . then ( ( result ) => {
158+ return expect ( result . css ) . toMatchFormattedCss ( css `
159+ @media screen {
160+ .screen\:parent .child {
161+ foo : bar;
162+ }
163+ .parent .screen\:child {
164+ foo : bar;
165+ }
166+ }
167+ ` )
168+ } )
169+ } )
137170} )
138171
139172test ( 'stacked peer variants' , async ( ) => {
You can’t perform that action at this time.
0 commit comments