Skip to content

Commit 2cdb5fc

Browse files
committed
Hide shortcuts when using a touch screen
1 parent e8faaf2 commit 2cdb5fc

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

client/css/styles.scss

+25-13
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,36 @@ html.fractal-root {
128128
padding-top: 0;
129129
flex-direction: column;
130130

131-
.shortcut-hint {
132-
text-decoration: underline;
133-
}
131+
#shortcuts {
132+
.shortcut-hint {
133+
text-decoration: underline;
134+
}
134135

135-
.checkbox-wrapper {
136-
display: flex;
137-
align-items: center;
138-
gap: var(--space-4);
139-
}
136+
.checkbox-wrapper {
137+
display: flex;
138+
align-items: center;
139+
gap: var(--space-4);
140+
}
140141

141-
.shortcut-wrapper {
142-
display: flex;
143-
align-items: center;
144-
gap: var(--space-8);
142+
.shortcut-wrapper {
143+
display: flex;
144+
align-items: center;
145+
gap: var(--space-8);
145146

146-
#macShortcut {
147+
#macShortcut {
148+
display: none;
149+
}
150+
}
151+
}
152+
153+
@media (pointer: coarse) {
154+
#shortcuts {
147155
display: none;
148156
}
157+
158+
#shortcuts + details {
159+
border-top: none;
160+
}
149161
}
150162

151163
.iteration-buttons {

client/html/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ <h1 class="nav-heading">
104104
</div>
105105
</div>
106106
<div id="inputsWrapper" class="overlay">
107-
<details open class="mobile-hidden">
107+
<details open class="mobile-hidden" id="shortcuts">
108108
<summary><span>Shortcuts</span></summary>
109109
<div class="details-content">
110110
<div class="shortcut-wrapper">

0 commit comments

Comments
 (0)