Skip to content

Commit bd501e8

Browse files
Add ::-webkit-details-marker pseudo to marker variant (#17362)
See #17360 This PR updates the `marker` variant to also target the marker present in `<summary>` elements in WebKit browsers. Chromium uses `::marker` and is therefore already covered. --------- Co-authored-by: Philipp Spiess <[email protected]>
1 parent e8715d0 commit bd501e8

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
- _Experimental_: Add `@source inline(…)` ([#17147](https://github.com/tailwindlabs/tailwindcss/pull/17147))
2222
- Add support for literal values in `--value('…')` and `--modifier('…')` ([#17304](https://github.com/tailwindlabs/tailwindcss/pull/17304))
2323
- Add suggestions when `--spacing(--value(integer, number))` is used ([#17308](https://github.com/tailwindlabs/tailwindcss/pull/17308))
24+
- Add `::-webkit-details-marker` pseudo to `marker` variant ([#17362](https://github.com/tailwindlabs/tailwindcss/pull/17362))
2425

2526
### Fixed
2627

packages/tailwindcss/src/variants.test.ts

+16
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ test('marker', async () => {
5050
5151
.marker\\:flex::marker {
5252
display: flex;
53+
}
54+
55+
.marker\\:flex ::-webkit-details-marker {
56+
display: flex;
57+
}
58+
59+
.marker\\:flex::-webkit-details-marker {
60+
display: flex;
5361
}"
5462
`)
5563
expect(await run(['marker/foo:flex'])).toEqual('')
@@ -2255,6 +2263,14 @@ test('variant order', async () => {
22552263
display: flex;
22562264
}
22572265
2266+
.marker\\:flex ::-webkit-details-marker {
2267+
display: flex;
2268+
}
2269+
2270+
.marker\\:flex::-webkit-details-marker {
2271+
display: flex;
2272+
}
2273+
22582274
.selection\\:flex ::selection {
22592275
display: flex;
22602276
}

packages/tailwindcss/src/variants.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,12 @@ export function createVariants(theme: Theme): Variants {
622622
staticVariant('first-letter', ['&::first-letter'])
623623
staticVariant('first-line', ['&::first-line'])
624624

625-
// TODO: Remove alpha vars or no?
626-
staticVariant('marker', ['& *::marker', '&::marker'])
625+
staticVariant('marker', [
626+
'& *::marker',
627+
'&::marker',
628+
'& *::-webkit-details-marker',
629+
'&::-webkit-details-marker',
630+
])
627631

628632
staticVariant('selection', ['& *::selection', '&::selection'])
629633
staticVariant('file', ['&::file-selector-button'])

0 commit comments

Comments
 (0)