Skip to content

Commit 52bc9aa

Browse files
committed
Only show the scroll to top button on desktop (when no menu button)
1 parent 0d722f8 commit 52bc9aa

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

app/assets/styles.css

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -262,48 +262,6 @@ section.event {
262262
border: 0;
263263
}
264264

265-
.scroll-to-top {
266-
position: fixed;
267-
bottom: 50px;
268-
right: 30px;
269-
z-index: 10;
270-
display: block;
271-
background: var(--color-gray-500);
272-
border-width: 0;
273-
height: 50px;
274-
width: 50px;
275-
border-radius: 50%;
276-
transition:
277-
all 0.2s linear,
278-
opacity 0.3s;
279-
cursor: pointer;
280-
opacity: 0;
281-
pointer-events: none;
282-
}
283-
284-
.scroll-to-top.is-visible {
285-
opacity: 1;
286-
pointer-events: auto;
287-
}
288-
289-
.scroll-to-top:hover {
290-
transform: scale(1.1);
291-
}
292-
293-
.scroll-to-top::after {
294-
content: "";
295-
position: absolute;
296-
left: 16px;
297-
z-index: 11;
298-
display: block;
299-
width: 15px;
300-
height: 15px;
301-
border-top: 4px solid var(--color-gray-100);
302-
border-left: 4px solid var(--color-gray-100);
303-
transform: rotate(45deg);
304-
top: 20px;
305-
}
306-
307265
/* Ember data uses styled elements in markdown blocks that conflict with the
308266
default styles for blockquotes (because of ::before block that has an
309267
absolutely positioned quote mark).
@@ -377,6 +335,48 @@ table td {
377335
.content {
378336
margin-top: var(--spacing-4);
379337
}
338+
339+
.scroll-to-top {
340+
position: fixed;
341+
bottom: 50px;
342+
right: 30px;
343+
z-index: 10;
344+
display: block;
345+
background: var(--color-gray-500);
346+
border-width: 0;
347+
height: 50px;
348+
width: 50px;
349+
border-radius: 50%;
350+
transition:
351+
all 0.2s linear,
352+
opacity 0.3s;
353+
cursor: pointer;
354+
opacity: 0;
355+
pointer-events: none;
356+
}
357+
358+
.scroll-to-top.is-visible {
359+
opacity: 1;
360+
pointer-events: auto;
361+
}
362+
363+
.scroll-to-top:hover {
364+
transform: scale(1.1);
365+
}
366+
367+
.scroll-to-top::after {
368+
content: "";
369+
position: absolute;
370+
left: 16px;
371+
z-index: 11;
372+
display: block;
373+
width: 15px;
374+
height: 15px;
375+
border-top: 4px solid var(--color-gray-100);
376+
border-left: 4px solid var(--color-gray-100);
377+
transform: rotate(45deg);
378+
top: 20px;
379+
}
380380
}
381381

382382
@media (width <= 450px) {

0 commit comments

Comments
 (0)