1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 08:33:31 +01:00

Expand ha-slider touch target for volume slider usability (#30109)

Add padding to the #slider element in ha-slider to expand its touch
target to 32px, making sliders easier to interact with on touch devices.

Remove the pointer-events: none workaround on the volume slider in the
media player more-info dialog. This workaround disabled touch interaction
entirely on coarse pointer devices, which is no longer needed now that
the slider has an adequately sized touch target.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Logan Rosen
2026-03-12 03:03:26 -04:00
committed by GitHub
parent 268c0a60f0
commit 51ecdb0851
2 changed files with 6 additions and 6 deletions

View File

@@ -61,6 +61,12 @@ export class HaSlider extends Slider {
width: 200px;
}
/* Expand slider touch target to 32px */
#slider {
padding-block: 14px;
margin-block: -14px;
}
#thumb {
border: none;
background-color: var(--ha-slider-thumb-color, var(--primary-color));

View File

@@ -586,12 +586,6 @@ class MoreInfoMediaPlayer extends LitElement {
width: 100%;
}
@media (pointer: coarse) {
.volume-slider {
pointer-events: none;
}
}
.volume ha-svg-icon {
padding: var(--ha-space-1);
height: 16px;