Skip to content

Commit

Permalink
frontend: use custom scrollbars only on linux and windows
Browse files Browse the repository at this point in the history
Changed to use native scrollbars on macOS and iOS.

Android does not use scrollbars (at lest from Android version 14).

Only keep custom scrollbar CSS for Linux and Windows.
  • Loading branch information
thisconnect committed Nov 19, 2024
1 parent df1ad7d commit d454ec2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- macOS: use native scrollbars

# 4.46.0
- Android: enable export logs feature
Expand Down
2 changes: 2 additions & 0 deletions frontends/web/src/components/layout/main.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.main {
/* define background color so macOS renders native scrollbars with correct color */
background-color: var(--background);
display: flex;
flex-direction: column;
flex-grow: 1;
Expand Down
9 changes: 6 additions & 3 deletions frontends/web/src/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,18 @@ h1, h2, h3, h4, h5 {
line-height: 1.25;
}

::-webkit-scrollbar {
.os-linux::-webkit-scrollbar,
.os-windows::-webkit-scrollbar {
background-color: transparent;
width: 4px;
}
::-webkit-scrollbar-track {
.os-linux::-webkit-scrollbar-track,
.os-windows::-webkit-scrollbar-track {
background-color: transparent;
}

::-webkit-scrollbar-thumb {
.os-linux::-webkit-scrollbar-thumb,
.os-windows::-webkit-scrollbar-thumb {
background-color: var(--color-secondary);
}

Expand Down

0 comments on commit d454ec2

Please sign in to comment.