Skip to content

Commit dbe382f

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. (cherry picked from commit 903732e) # Conflicts: # app/assets/builds/alchemy/admin.css
1 parent 97e0cdf commit dbe382f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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)