Skip to content

Commit 903732e

Browse files
committed
Hide Shoelace tooltips on touch devices
Tooltips are not useful on touch devices where there is no hover interaction. The coarse pointer media query targets touch screens and hides the tooltip popup accordingly. This prevents the behavior of open tooltips in the background after a dialog was opened.
1 parent 4c2023f commit 903732e

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

app/assets/builds/alchemy/admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/stylesheets/alchemy/admin/shoelace.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ sl-tooltip {
307307
border-radius: var(--border-radius_medium);
308308
box-shadow: var(--tooltip-box-shadow);
309309
}
310+
311+
@media (pointer: coarse) {
312+
&::part(base__popup) {
313+
display: none;
314+
}
315+
}
310316
}
311317

312318
sl-button {

0 commit comments

Comments
 (0)