Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
  • Loading branch information
thecrypticace committed Apr 27, 2023
commit 6e7745fdfbfcacc939673b61c325ec85152cad30
8 changes: 4 additions & 4 deletions src/util/pseudoElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
/** @type {Record<string, PseudoProperty[]>} */
let elementProperties = {
'::after': ['terminal', 'jumpable'],
'::backdrop': ['terminal'],
'::backdrop': ['terminal', 'jumpable'],
'::before': ['terminal', 'jumpable'],
'::cue': ['terminal'],
'::cue-region': ['terminal'],
'::first-letter': ['terminal', 'jumpable'],
'::first-line': ['terminal', 'jumpable'],
'::grammar-error': ['terminal'],
'::marker': ['terminal'],
'::marker': ['terminal', 'jumpable'],
'::part': ['terminal', 'actionable'],
'::placeholder': ['terminal'],
'::selection': ['terminal'],
'::placeholder': ['terminal', 'jumpable'],
'::selection': ['terminal', 'jumpable'],
'::slotted': ['terminal'],
'::spelling-error': ['terminal'],
'::target-text': ['terminal'],
Expand Down
4 changes: 4 additions & 0 deletions tests/format-variant-selector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ crosscheck(() => {
${'#app :is(:is(.dark &)::before)'} | ${'#app :is(:is(.dark &))::before'}
${'#app :is(.foo::file-selector-button)'} | ${'#app :is(.foo)::file-selector-button'}
${'#app :is(.foo::-webkit-progress-bar)'} | ${'#app :is(.foo)::-webkit-progress-bar'}
${'.parent::marker li'} | ${'.parent li::marker'}
${'.parent::selection li'} | ${'.parent li::selection'}
${'.parent::placeholder input'} | ${'.parent input::placeholder'}
${'.parent::backdrop dialog'} | ${'.parent dialog::backdrop'}
`('should translate "$before" into "$after"', ({ before, after }) => {
let result = finalizeSelector('.a', [{ format: before, isArbitraryVariant: false }], {
candidate: 'a',
Expand Down