@@ -139,6 +139,31 @@ test('it can generate hover, active and focus variants', () => {
139139 } )
140140} )
141141
142+ test ( 'it can generate hover, active and focus variants for multiple classes in one rule' , ( ) => {
143+ const input = `
144+ @variants hover, focus, active {
145+ .banana, .lemon { color: yellow; }
146+ .chocolate, .coconut { color: brown; }
147+ }
148+ `
149+
150+ const output = `
151+ .banana, .lemon { color: yellow; }
152+ .chocolate, .coconut { color: brown; }
153+ .hover\\:banana:hover, .hover\\:lemon:hover { color: yellow; }
154+ .hover\\:chocolate:hover, .hover\\:coconut:hover { color: brown; }
155+ .focus\\:banana:focus, .focus\\:lemon:focus { color: yellow; }
156+ .focus\\:chocolate:focus, .focus\\:coconut:focus { color: brown; }
157+ .active\\:banana:active, .active\\:lemon:active { color: yellow; }
158+ .active\\:chocolate:active, .active\\:coconut:active { color: brown; }
159+ `
160+
161+ return run ( input ) . then ( result => {
162+ expect ( result . css ) . toMatchCss ( output )
163+ expect ( result . warnings ( ) . length ) . toBe ( 0 )
164+ } )
165+ } )
166+
142167test ( 'it wraps the output in a responsive at-rule if responsive is included as a variant' , ( ) => {
143168 const input = `
144169 @variants responsive, hover, focus {
0 commit comments