Skip to content

Commit 539cda4

Browse files
committed
Attempt to make scrollbar normalized across browsers
1 parent 6f0bae0 commit 539cda4

4 files changed

Lines changed: 70 additions & 1 deletion

File tree

resources/public/assets/css/site.css

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/public/assets/css/site.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Modern standard scrollbar styling
2+
* {
3+
// For Firefox
4+
scrollbar-width: thin;
5+
scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
6+
7+
// For Chrome, Edge, and Safari
8+
&::-webkit-scrollbar {
9+
width: 8px;
10+
height: 8px;
11+
background-color: transparent;
12+
}
13+
14+
&::-webkit-scrollbar-track {
15+
background-color: transparent;
16+
border-radius: 10px;
17+
}
18+
19+
&::-webkit-scrollbar-thumb {
20+
background-color: rgba(0, 0, 0, 0.3);
21+
border-radius: 10px;
22+
23+
&:hover {
24+
background-color: rgba(0, 0, 0, 0.5);
25+
}
26+
}
27+
28+
// Hide scrollbars when not hovering (auto-hide behavior)
29+
&:not(:hover)::-webkit-scrollbar-thumb {
30+
background-color: rgba(0, 0, 0, 0.15);
31+
}
32+
}
33+
34+
// For Internet Explorer (if needed)
35+
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
36+
* {
37+
-ms-overflow-style: -ms-autohiding-scrollbar;
38+
}
39+
}

src/clojurescript/sass/site.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use 'normalize';
2+
@use 'scrollbar';
23
@use 'colors' as *;
34
@use "sass:color";
45
@use 'modal';

0 commit comments

Comments
 (0)