Skip to content

Commit 00a79e6

Browse files
committed
Split tests for at-rule and at-rule with selector changes
1 parent 3236eb9 commit 00a79e6

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

tests/arbitrary-variants.test.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ test('using the important modifier', () => {
135135

136136
test('at-rules', () => {
137137
let config = {
138-
content: [{ raw: html`<div class="[@supports_(what:ever){&:hover}]:underline"></div>` }],
138+
content: [{ raw: html`<div class="[@supports_(what:ever)]:underline"></div>` }],
139139
corePlugins: { preflight: false },
140140
}
141141

@@ -150,7 +150,32 @@ test('at-rules', () => {
150150
${defaults}
151151
152152
@supports (what: ever) {
153-
.\[\@supports_\(what\:ever\)\{\&\:hover\}\]\:underline:hover {
153+
.\[\@supports_\(what\:ever\)\]\:underline {
154+
text-decoration-line: underline;
155+
}
156+
}
157+
`)
158+
})
159+
})
160+
161+
test('at-rules with selector modifications', () => {
162+
let config = {
163+
content: [{ raw: html`<div class="[@media_(hover:hover){&:hover}]:underline"></div>` }],
164+
corePlugins: { preflight: false },
165+
}
166+
167+
let input = css`
168+
@tailwind base;
169+
@tailwind components;
170+
@tailwind utilities;
171+
`
172+
173+
return run(input, config).then((result) => {
174+
expect(result.css).toMatchFormattedCss(css`
175+
${defaults}
176+
177+
@media (hover: hover) {
178+
.\[\@media_\(hover\:hover\)\{\&\:hover\}\]\:underline:hover {
154179
text-decoration-line: underline;
155180
}
156181
}

0 commit comments

Comments
 (0)