Skip to content

Commit 571d4af

Browse files
committed
more tests
1 parent b863a63 commit 571d4af

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

tests/variant-grouping.test.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,45 @@ it('should be possible to group nested grouped variants', () => {
104104
})
105105
})
106106

107+
it('should be possible to use nested multiple grouped variants', () => {
108+
let config = {
109+
experimental: 'all',
110+
content: [
111+
{
112+
raw: html`<div class="md:(text-black,dark:(text-white,hover:focus:text-gray-100))"></div>`,
113+
},
114+
],
115+
corePlugins: { preflight: false },
116+
plugins: [],
117+
}
118+
119+
let input = css`
120+
@tailwind utilities;
121+
`
122+
123+
return run(input, config).then((result) => {
124+
expect(result.css).toMatchFormattedCss(css`
125+
@media (min-width: 768px) {
126+
.md\:\(text-black\2c dark\:\(text-white\2c hover\:focus\:text-gray-100\)\) {
127+
--tw-text-opacity: 1;
128+
color: rgb(0 0 0 / var(--tw-text-opacity));
129+
}
130+
131+
@media (prefers-color-scheme: dark) {
132+
.md\:\(text-black\2c dark\:\(text-white\2c hover\:focus\:text-gray-100\)\) {
133+
--tw-text-opacity: 1;
134+
color: rgb(255 255 255 / var(--tw-text-opacity));
135+
}
136+
.md\:\(text-black\2c dark\:\(text-white\2c hover\:focus\:text-gray-100\)\):focus:hover {
137+
--tw-text-opacity: 1;
138+
color: rgb(243 244 246 / var(--tw-text-opacity));
139+
}
140+
}
141+
}
142+
`)
143+
})
144+
})
145+
107146
it('should group with variants defined in external plugins', () => {
108147
let config = {
109148
experimental: 'all',

0 commit comments

Comments
 (0)