Disable pointer-events for tile-card .icon-container class that don't have a "button" role (#19497)

Set pointer-events to none for icon containers that don't have button role
This commit is contained in:
Joni Käki-Mäkelä 2024-01-31 01:15:41 +02:00 committed by GitHub
parent e45709fffc
commit 6cd8ee9253
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View File

@ -79,6 +79,18 @@ const CONFIGS = [
color: pink
`,
},
{
heading: "Whole tile tap action",
config: `
- type: tile
entity: switch.tv_outlet
color: pink
tap_action:
action: toggle
icon_tap_action:
action: none
`,
},
{
heading: "Unknown entity",
config: `

View File

@ -525,6 +525,9 @@ export class HuiTileCard extends LitElement implements LovelaceCard {
top: -3px;
right: -3px;
}
.icon-container:not([role="button"]) {
pointer-events: none;
}
.icon-container[role="button"]:focus-visible,
.icon-container[role="button"]:active {
transform: scale(1.2);