Skip to content

Commit 75a05a4

Browse files
committed
feat(tgui): color scrollbars based on current UI theme
TGUI bundles were rebuilt to apply changes. This commit is based on Aylong's PR for Paradise Station: ParadiseSS13/Paradise#26433
1 parent a1b2d09 commit 75a05a4

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

tgui/packages/tgui/styles/layouts/Layout.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@
55

66
@use 'sass:color';
77
@use '../base.scss';
8+
@use '../functions.scss' as *;
89

910
$scrollbar-color-multiplier: 1 !default;
11+
$luminance: luminance(base.$color-bg);
12+
$scrollbar-base: color.scale(base.$color-bg, $lightness: -25% * $scrollbar-color-multiplier);
13+
$scrollbar-face: color.scale(base.$color-bg, $lightness: if($luminance > 0.05, 30%, 10%) * $scrollbar-color-multiplier);
14+
15+
html,
16+
body {
17+
scrollbar-color: $scrollbar-face $scrollbar-base;
18+
}
1019

1120
.Layout,
1221
.Layout * {

tgui/public/tgui-panel.bundle.css

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

tgui/public/tgui.bundle.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)