Skip to content

Commit ef056a5

Browse files
Fix issues with some pseudo-elements (#11111)
* Fix issues with some pseudo-elements We’ve included pseudo elements for backdrop, marker, placeholder, and selection and they were all “jumpable” before we made changes in v3.3.2. Ideally they wouldn’t be because if they ever eventually have any interactivity that could become a problem. * Update changelog
1 parent 1867744 commit ef056a5

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
### Fixed
11+
12+
- Fix issue where some pseudo-element variants generated the wrong selector ([#10943](https://github.com/tailwindlabs/tailwindcss/pull/10943), [#10962](https://github.com/tailwindlabs/tailwindcss/pull/10962))
1113

1214
## [3.3.2] - 2023-04-25
1315

src/util/pseudoElements.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
/** @type {Record<string, PseudoProperty[]>} */
2727
let elementProperties = {
2828
'::after': ['terminal', 'jumpable'],
29-
'::backdrop': ['terminal'],
29+
'::backdrop': ['terminal', 'jumpable'],
3030
'::before': ['terminal', 'jumpable'],
3131
'::cue': ['terminal'],
3232
'::cue-region': ['terminal'],
3333
'::first-letter': ['terminal', 'jumpable'],
3434
'::first-line': ['terminal', 'jumpable'],
3535
'::grammar-error': ['terminal'],
36-
'::marker': ['terminal'],
36+
'::marker': ['terminal', 'jumpable'],
3737
'::part': ['terminal', 'actionable'],
38-
'::placeholder': ['terminal'],
39-
'::selection': ['terminal'],
38+
'::placeholder': ['terminal', 'jumpable'],
39+
'::selection': ['terminal', 'jumpable'],
4040
'::slotted': ['terminal'],
4141
'::spelling-error': ['terminal'],
4242
'::target-text': ['terminal'],

tests/format-variant-selector.test.js

+4
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ crosscheck(() => {
352352
${'#app :is(:is(.dark &)::before)'} | ${'#app :is(:is(.dark &))::before'}
353353
${'#app :is(.foo::file-selector-button)'} | ${'#app :is(.foo)::file-selector-button'}
354354
${'#app :is(.foo::-webkit-progress-bar)'} | ${'#app :is(.foo)::-webkit-progress-bar'}
355+
${'.parent::marker li'} | ${'.parent li::marker'}
356+
${'.parent::selection li'} | ${'.parent li::selection'}
357+
${'.parent::placeholder input'} | ${'.parent input::placeholder'}
358+
${'.parent::backdrop dialog'} | ${'.parent dialog::backdrop'}
355359
`('should translate "$before" into "$after"', ({ before, after }) => {
356360
let result = finalizeSelector('.a', [{ format: before, isArbitraryVariant: false }], {
357361
candidate: 'a',

0 commit comments

Comments
 (0)