Skip to content

Commit e4482c7

Browse files
committed
ensure stacking dark and rtl variants with pseudo elements works as expected
1 parent 4d2d870 commit e4482c7

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

tests/variants.test.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ crosscheck(({ stable, oxide }) => {
11341134
darkMode: 'class',
11351135
content: [
11361136
{
1137-
raw: html` <div class="dark:rtl:italic" /> `,
1137+
raw: html`<div class="dark:rtl:italic" />`,
11381138
},
11391139
],
11401140
corePlugins: { preflight: false },
@@ -1152,4 +1152,28 @@ crosscheck(({ stable, oxide }) => {
11521152
}
11531153
`)
11541154
})
1155+
1156+
test('stacking dark and rtl variants with pseudo elements', async () => {
1157+
let config = {
1158+
darkMode: 'class',
1159+
content: [
1160+
{
1161+
raw: html`<div class="dark:rtl:placeholder:italic" />`,
1162+
},
1163+
],
1164+
corePlugins: { preflight: false },
1165+
}
1166+
1167+
let input = css`
1168+
@tailwind utilities;
1169+
`
1170+
1171+
let result = await run(input, config)
1172+
1173+
expect(result.css).toMatchFormattedCss(css`
1174+
:is(.dark :is([dir='rtl'] .dark\:rtl\:placeholder\:italic))::placeholder {
1175+
font-style: italic;
1176+
}
1177+
`)
1178+
})
11551179
})

0 commit comments

Comments
 (0)