Make sure each hover style is applied to :focus-visible
This commit is contained in:
parent
5461289cb7
commit
59c090ae2d
8 changed files with 9 additions and 8 deletions
1
changelog.d/focus-visible.fix
Normal file
1
changelog.d/focus-visible.fix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Make sure hover style is also applied to :focus-visible
|
||||||
|
|
@ -11,7 +11,7 @@ export default {
|
||||||
toggled: '.toggled',
|
toggled: '.toggled',
|
||||||
focused: ':focus-within',
|
focused: ':focus-within',
|
||||||
pressed: ':focus:active',
|
pressed: ':focus:active',
|
||||||
hover: ':hover:not(:disabled)',
|
hover: ':is(:hover, :focus-visible):not(:disabled)',
|
||||||
disabled: ':disabled'
|
disabled: ':disabled'
|
||||||
},
|
},
|
||||||
// Variants are mutually exclusive, each component implicitly has "normal" variant, and all other variants inherit from it.
|
// Variants are mutually exclusive, each component implicitly has "normal" variant, and all other variants inherit from it.
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ export default {
|
||||||
states: {
|
states: {
|
||||||
toggled: '.toggled',
|
toggled: '.toggled',
|
||||||
disabled: ':disabled',
|
disabled: ':disabled',
|
||||||
hover: ':hover:not(:disabled)',
|
hover: ':is(:hover, :focus-visible):not(:disabled)',
|
||||||
focused: ':focus-within'
|
focused: ':focus-within:not(:is(:focus-visible))'
|
||||||
},
|
},
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
'Text',
|
'Text',
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ export default {
|
||||||
name: 'Input',
|
name: 'Input',
|
||||||
selector: '.input',
|
selector: '.input',
|
||||||
states: {
|
states: {
|
||||||
hover: ':hover:not(.disabled)',
|
hover: ':is(:hover, :focus-visible):not(.disabled)',
|
||||||
focused: ':focus-within',
|
focused: ':focus-within',
|
||||||
disabled: '.disabled'
|
disabled: '.disabled'
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ export default {
|
||||||
selector: '.list-item',
|
selector: '.list-item',
|
||||||
states: {
|
states: {
|
||||||
active: '.-active',
|
active: '.-active',
|
||||||
hover: ':hover:not(.-non-interactive)'
|
hover: ':is(:hover, :focus-visible, :has(:focus-visible)):not(.-non-interactive)'
|
||||||
},
|
},
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
'Text',
|
'Text',
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export default {
|
||||||
'Avatar'
|
'Avatar'
|
||||||
],
|
],
|
||||||
states: {
|
states: {
|
||||||
hover: ':hover:not(.disabled)',
|
hover: ':is(:hover, :focus-visible, :has(:focus-visible)):not(.disabled)',
|
||||||
active: '.-active',
|
active: '.-active',
|
||||||
disabled: '.disabled'
|
disabled: '.disabled'
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ export default {
|
||||||
notEditable: true, // for now
|
notEditable: true, // for now
|
||||||
states: {
|
states: {
|
||||||
pressed: ':active',
|
pressed: ':active',
|
||||||
hover: ':hover:not(:disabled)',
|
hover: ':is(:hover, :focus-visible, :has(:focus-visible)):not(:disabled)',
|
||||||
disabled: ':disabled'
|
disabled: ':disabled'
|
||||||
},
|
},
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ export default {
|
||||||
selector: '.tab', // CSS selector/prefix
|
selector: '.tab', // CSS selector/prefix
|
||||||
states: {
|
states: {
|
||||||
active: '.active',
|
active: '.active',
|
||||||
hover: ':hover:not(.disabled)',
|
hover: ':is(:hover, :focus-visible, :has(:focus-visible)):not(.disabled)',
|
||||||
disabled: '.disabled'
|
disabled: '.disabled'
|
||||||
},
|
},
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue