feat: Mac-like scrollbars - thin, no track, shown while scrolling or at the edge and fading out, none when there is nothing to scroll; a lone terminal's bar sits by the frame, right of the plus
This commit is contained in:
1 parent
baee90b564
commit
25ffa60d09
10 files changed
+78
-5
No files matched your search
@@ -246,3 +246,16 @@ input.sw:disabled { opacity: .45; cursor: not-allowed; }
|
||||
table.stack td.actions { width: auto; padding-top: 8px; justify-content: flex-start; }
|
||||
table.stack td:empty { display: none; }
|
||||
}
|
||||
|
||||
/* Scrollbars as on a Mac: thin, no track, seen only while scrolling or with
|
||||
the pointer at the edge, then fading out (scroll.js sets --sb from 0 to 1).
|
||||
Nothing to scroll, nothing shown. */
|
||||
* { --sb: 0; }
|
||||
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
|
||||
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
|
||||
::-webkit-scrollbar-thumb { border-radius: 4px; border: 2px solid transparent; background-clip: padding-box;
|
||||
background-color: rgba(170, 180, 195, calc(var(--sb) * .5)); }
|
||||
::-webkit-scrollbar-thumb:hover { background-color: rgba(170, 180, 195, calc(var(--sb) * .75)); }
|
||||
@supports not selector(::-webkit-scrollbar) {
|
||||
* { scrollbar-width: thin; scrollbar-color: rgba(170, 180, 195, calc(var(--sb) * .5)) transparent; }
|
||||
}
|
||||
Reference in new issue
Block a user