Skip to content

Commit 59038c5

Browse files
Include :popover-open in open variant (#13331)
* Include :popover-open in open variant Co-Authored-By: Luke Warlow <[email protected]> * Update changelog * Remove accidental package.json change * Revert playground changes --------- Co-authored-by: Adam Wathan <[email protected]> Co-authored-by: Luke Warlow <[email protected]>
1 parent de79455 commit 59038c5

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Make `rotate-x/y/z-*` utilities composable ([#13319](https://github.com/tailwindlabs/tailwindcss/pull/13319))
1313
- `@tailwind/vite` applies the Vite CSS plugin to transform Tailwind-generated CSS (e.g. inlining images) ([#13218](https://github.com/tailwindlabs/tailwindcss/pull/13218))
1414
- Add `starting` variant for `@starting-style` ([#13329](https://github.com/tailwindlabs/tailwindcss/pull/13329))
15+
- Target `:popover-open` in existing `open` variant ([#13331](https://github.com/tailwindlabs/tailwindcss/pull/13331))
1516

1617
### Fixed
1718

packages/tailwindcss/src/variants.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,15 @@ test('target', () => {
270270

271271
test('open', () => {
272272
expect(run(['open:flex', 'group-open:flex', 'peer-open:flex'])).toMatchInlineSnapshot(`
273-
".group-open\\:flex:is(:where(.group)[open] *) {
273+
".group-open\\:flex:is(:where(.group):is([open], :popover-open) *) {
274274
display: flex;
275275
}
276276
277-
.peer-open\\:flex:is(:where(.peer)[open] ~ *) {
277+
.peer-open\\:flex:is(:where(.peer):is([open], :popover-open) ~ *) {
278278
display: flex;
279279
}
280280
281-
.open\\:flex[open] {
281+
.open\\:flex:is([open], :popover-open) {
282282
display: flex;
283283
}"
284284
`)
@@ -1834,7 +1834,7 @@ test('variant order', () => {
18341834
display: flex;
18351835
}
18361836
1837-
.open\\:flex[open] {
1837+
.open\\:flex:is([open], :popover-open) {
18381838
display: flex;
18391839
}
18401840

packages/tailwindcss/src/variants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export function createVariants(theme: Theme): Variants {
292292
['visited', '&:visited'],
293293

294294
['target', '&:target'],
295-
['open', '&[open]'],
295+
['open', '&:is([open], :popover-open)'],
296296

297297
// Forms
298298
['default', '&:default'],

0 commit comments

Comments
 (0)