Skip to content

Commit

Permalink
Revert "fix scrollbar" (lmao UIs are huge)
Browse files Browse the repository at this point in the history
This reverts commit 7c43266.
  • Loading branch information
Absolucy committed Dec 22, 2024
1 parent dc4899a commit 4d0668e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 33 deletions.
14 changes: 3 additions & 11 deletions html/statbrowser.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
--scrollbar-thumb: #a7a7a7;
}

html,
body {
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-base);
}

body {
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 12px !important;
Expand All @@ -17,16 +12,13 @@ body {
overflow-y: scroll;
}

/**
* MARK: Dark theme colors
*/
.dark:root {
--scrollbar-base: #151515;
--scrollbar-base: #181818;
--scrollbar-thumb: #363636;
}

body.dark {
background-color: #151515;
background-color: #131313;
color: #b2c4dd;
scrollbar-base-color: #1c1c1c;
scrollbar-face-color: #3b3b3b;
Expand All @@ -45,7 +37,7 @@ body.dark {
}

.dark #menu {
background-color: #151515;
background-color: #202020;
}

#statcontent {
Expand Down
2 changes: 0 additions & 2 deletions html/statbrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,11 +710,9 @@ function draw_verbs(cat) {
function set_theme(which) {
if (which == "light") {
document.body.className = "";
document.documentElement.className = 'light';
set_style_sheet("browserOutput_white");
} else if (which == "dark") {
document.body.className = "dark";
document.documentElement.className = 'dark';
set_style_sheet("browserOutput");
}
}
Expand Down
2 changes: 0 additions & 2 deletions tgui/packages/tgui/layouts/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { addScrollableNode, removeScrollableNode } from '../events';

export const Layout = (props) => {
const { className, theme = 'nanotrasen', children, ...rest } = props;
document.documentElement.className = `theme-${theme}`;

return (
<div className={'theme-' + theme}>
<div
Expand Down
18 changes: 1 addition & 17 deletions tgui/packages/tgui/styles/layouts/Layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,8 @@

@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: -33% * $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 Expand Up @@ -55,9 +39,9 @@ body {
);
}

// Remove with 516, IE legacy code
.Layout,
.Layout * {
// Fancy scrollbar
@include fancy-scrollbar(base.$color-bg, $scrollbar-color-multiplier);
}

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% 70%;
background-size: 70%;
background-position: center;
background-repeat: no-repeat;
}

0 comments on commit 4d0668e

Please sign in to comment.