mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Improve slider/switch bar focus style (#15009)
Improve bar input focus style
This commit is contained in:
parent
c7da1a95da
commit
789a69fea5
@ -278,6 +278,11 @@ export class HaBarSlider extends LitElement {
|
|||||||
--slider-bar-border-radius: 10px;
|
--slider-bar-border-radius: 10px;
|
||||||
height: var(--slider-bar-thickness);
|
height: var(--slider-bar-thickness);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
border-radius: var(--slider-bar-border-radius);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
:host(:focus-visible) {
|
||||||
|
box-shadow: 0 0 0 2px var(--slider-bar-color);
|
||||||
}
|
}
|
||||||
:host([vertical]) {
|
:host([vertical]) {
|
||||||
width: var(--slider-bar-thickness);
|
width: var(--slider-bar-thickness);
|
||||||
|
@ -104,6 +104,14 @@ export class HaBarSwitch extends LitElement {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
border-radius: var(--switch-bar-border-radius);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
:host(:focus-visible) {
|
||||||
|
box-shadow: 0 0 0 2px var(--switch-bar-off-color);
|
||||||
|
}
|
||||||
|
:host([checked]:focus-visible) {
|
||||||
|
box-shadow: 0 0 0 2px var(--switch-bar-on-color);
|
||||||
}
|
}
|
||||||
.switch {
|
.switch {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user