Skip to content

Commit d29b3cd

Browse files
committed
add test for the ui-not-focus-visible variant
1 parent e644d97 commit d29b3cd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/@headlessui-tailwindcss/src/index.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ it('should generate the ui-focus-visible variant', async () => {
6868
})
6969
})
7070

71+
it('should generate the ui-not-focus-visible variant', async () => {
72+
let config = {
73+
content: [{ raw: html`<div class="ui-not-focus-visible:underline"></div>` }],
74+
plugins: [hui],
75+
}
76+
77+
return run('@tailwind utilities', config).then((result) => {
78+
expect(result.css).toMatchFormattedCss(css`
79+
.ui-not-focus-visible\:underline:focus:where(:not([data-headlessui-focus-visible]
80+
.ui-not-focus-visible\:underline)) {
81+
text-decoration-line: underline;
82+
}
83+
`)
84+
})
85+
})
86+
7187
describe('custom prefix', () => {
7288
it('should generate css for an exposed state', async () => {
7389
let config = {

0 commit comments

Comments
 (0)