Skip to content

Commit

Permalink
Fix scrollbars on BYOND 516 (#5142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Jan 30, 2025
1 parent e006b29 commit 4e65141
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export const DesignBrowser = <T extends Design = Design>(
</Section>
</Stack.Item>
<Stack.Item grow>
<Section fill style={{ overflow: 'auto' }}>
<Section fill scrollable>
{searchText.length > 0 ? (
sortBy((design: T) => design.name)(
Object.values(root.descendants),
Expand Down
16 changes: 16 additions & 0 deletions tgui/packages/tgui/styles/layouts/Layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,24 @@

@use 'sass:color';
@use '../base.scss';
@use '../functions.scss' as *;

$scrollbar-color-multiplier: 1 !default;
$luminance: luminance(base.$color-bg);
$scrollbar-base: color.scale(
base.$color-bg,
$lightness: -25% * $scrollbar-color-multiplier
);
$scrollbar-face: color.scale(
base.$color-bg,
$lightness: if($luminance > 0.05, 30%, 10%) * $scrollbar-color-multiplier
);

// Fancy scrollbar
html,
body {
scrollbar-color: $scrollbar-face $scrollbar-base;
}

@mixin fancy-scrollbar($base-color, $color-multiplier) {
scrollbar-base-color: color.scale(
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
// NT Theme
.Layout__content {
background-image: url('../assets/bg-nanotrasen.svg');
background-size: 70%;
background-size: 70% 70%;
background-position: center;
background-repeat: no-repeat;
}

0 comments on commit 4e65141

Please sign in to comment.