Skip to content

Commit f3707ea

Browse files
AyIongAbsolucy
authored andcommitted
[NO GBP] Fix 516 scrollbar and background image (#88617)
Ports - ParadiseSS13/Paradise#26433 Fixes scrollbar color for Byond 516, and background position Colorfull scrollbar <details><summary> Videos </summary> https://github.com/user-attachments/assets/969b4f6f-f553-4786-86c7-df11c034675b </details> :cl: fix: Fixed scrollbar colors and background position in TGUI on Byond 516 /:cl:
1 parent 2a3b52b commit f3707ea

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

html/statbrowser.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
--scrollbar-thumb: #a7a7a7;
44
}
55

6+
html,
7+
body {
8+
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-base);
9+
}
10+
611
body {
712
font-family: Verdana, Geneva, Tahoma, sans-serif;
813
font-size: 12px;
@@ -182,9 +187,16 @@ img {
182187
margin-bottom: 1em;
183188
}
184189

185-
/* Dark theme colors */
190+
/**
191+
* MARK: Dark theme colors
192+
*/
193+
.dark:root {
194+
--scrollbar-base: #151515;
195+
--scrollbar-thumb: #363636;
196+
}
197+
186198
body.dark {
187-
background-color: #131313;
199+
background-color: #151515;
188200
color: #b2c4dd;
189201
scrollbar-base-color: #1c1c1c;
190202
scrollbar-face-color: #3b3b3b;
@@ -206,7 +218,7 @@ body.dark {
206218
}
207219

208220
.dark #menu {
209-
background-color: #131313;
221+
background-color: #151515;
210222
}
211223

212224
.dark #menu.tabs-classic .button.active {

html/statbrowser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,11 @@ function draw_verbs(cat) {
705705
function set_theme(which) {
706706
if (which == "light") {
707707
document.body.className = "";
708+
document.documentElement.className = 'light';
708709
set_style_sheet("browserOutput_white");
709710
} else if (which == "dark") {
710711
document.body.className = "dark";
712+
document.documentElement.className = 'dark';
711713
set_style_sheet("browserOutput");
712714
}
713715
}

tgui/packages/tgui/layouts/Layout.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { addScrollableNode, removeScrollableNode } from '../events';
1010

1111
export const Layout = (props) => {
1212
const { className, theme = 'nanotrasen', children, ...rest } = props;
13+
document.documentElement.className = `theme-${theme}`;
14+
1315
return (
1416
<div className={'theme-' + theme}>
1517
<div

0 commit comments

Comments
 (0)