kopia lustrzana https://github.com/shoelace-style/shoelace
Expose --focus-ring prop on tab
rodzic
45a38ea66f
commit
b45ca1a6d3
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
// Remove the focus ring when the user isn't interacting with a keyboard
|
// Remove the focus ring when the user isn't interacting with a keyboard
|
||||||
&:not(.focus-visible) ::slotted(sl-tab) {
|
&:not(.focus-visible) ::slotted(sl-tab) {
|
||||||
--focus-ring-box-shadow: none;
|
--focus-ring: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
@import 'component';
|
@import 'component';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @prop --focus-ring: The focus ring's box shadow.
|
||||||
|
*/
|
||||||
:host {
|
:host {
|
||||||
--focus-ring-box-shadow: var(--sl-focus-ring-box-shadow-inset);
|
--focus-ring: var(--sl-focus-ring-box-shadow-inset);
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +31,7 @@
|
||||||
|
|
||||||
&:focus:not(.tab--disabled) {
|
&:focus:not(.tab--disabled) {
|
||||||
color: var(--sl-color-primary-50);
|
color: var(--sl-color-primary-50);
|
||||||
box-shadow: var(--focus-ring-box-shadow);
|
box-shadow: var(--focus-ring);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tab--active:not(.tab--disabled) {
|
&.tab--active:not(.tab--disabled) {
|
||||||
|
|
Ładowanie…
Reference in New Issue