= {
+ small: 1,
+ medium: 2,
+ large: 3,
+ max: 6,
+ width: 1, // not used
+} as const;
+
export class TguiSay extends Component<{}, State> {
private channelIterator: ChannelIterator;
private chatHistory: ChatHistory;
@@ -281,9 +289,10 @@ export class TguiSay extends Component<{}, State> {
}
break;
- case KEY.Escape:
- this.handleClose();
- break;
+ default:
+ if (isEscape(event.key)) {
+ this.handleClose();
+ }
}
}
@@ -369,11 +378,14 @@ export class TguiSay extends Component<{}, State> {
{this.state.buttonContent}
diff --git a/tgui/packages/tgui-say/styles/button.scss b/tgui/packages/tgui-say/styles/button.scss
index 2ec90f75fa..7d546a6b73 100644
--- a/tgui/packages/tgui-say/styles/button.scss
+++ b/tgui/packages/tgui-say/styles/button.scss
@@ -19,6 +19,13 @@
}
}
+// Remove conditionals with 516
+@supports (not (-webkit-hyphens: none)) and (not (-moz-appearance: none)) {
+ .button {
+ outline: none;
+ }
+}
+
.button-lightMode {
background-color: colors.$lightBorder;
border: none;
diff --git a/tgui/packages/tgui-say/styles/colors.scss b/tgui/packages/tgui-say/styles/colors.scss
index 543f4ddd6c..b16da489bd 100644
--- a/tgui/packages/tgui-say/styles/colors.scss
+++ b/tgui/packages/tgui-say/styles/colors.scss
@@ -5,6 +5,7 @@ $button: #1f1f1f;
$lightMode: #ffffff;
$lightBorder: #bbbbbb;
$lightHover: #eaeaea;
+$scrollbar-color-multiplier: 1 !default;
$_channel_map: (
// Radio (EVA, Cas, Int use default color)
diff --git a/tgui/packages/tgui-say/styles/content.scss b/tgui/packages/tgui-say/styles/content.scss
index 83cb4dc8f1..25170935c8 100644
--- a/tgui/packages/tgui-say/styles/content.scss
+++ b/tgui/packages/tgui-say/styles/content.scss
@@ -1,14 +1,41 @@
.center {
display: flex;
- flex: 1 1;
- height: 100%;
- width: 100%;
+}
+
+// Remove conditionals with 516
+@supports (not (-webkit-hyphens: none)) and (not (-moz-appearance: none)) {
+ .center {
+ flex-grow: 1;
+ }
+}
+
+// Remove with 516
+@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
+ .center {
+ height: 100%;
+ width: 100%;
+ flex: 1 1 0;
+ }
}
.input {
display: flex;
- flex: 1 1;
- height: 100%;
- width: 100%;
font-family: 'Consolas', monospace;
}
+
+// Remove conditionals with 516
+@supports (not (-webkit-hyphens: none)) and (not (-moz-appearance: none)) {
+ .input {
+ flex-grow: 1;
+ gap: 0.2rem;
+ }
+}
+
+// Remove with 516
+@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
+ .input {
+ height: 100%;
+ width: 100%;
+ flex: 1 1 0;
+ }
+}
diff --git a/tgui/packages/tgui-say/styles/dragzone.scss b/tgui/packages/tgui-say/styles/dragzone.scss
index 314b57c4e4..8b035477d0 100644
--- a/tgui/packages/tgui-say/styles/dragzone.scss
+++ b/tgui/packages/tgui-say/styles/dragzone.scss
@@ -1,7 +1,17 @@
@use 'sass:color';
@use './colors.scss';
-$dragSize: 0.6rem;
+// Remove conditionals with 516
+@supports (not (-webkit-hyphens: none)) and (not (-moz-appearance: none)) {
+ $dragSize: 0.3rem;
+}
+
+// Remove with 516
+@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
+ $dragSize: 0.6rem;
+}
+
+$dragSize: 0.3rem;
$borderSize: 0.2rem;
.dragzone-horizontal {
diff --git a/tgui/packages/tgui-say/styles/textarea.scss b/tgui/packages/tgui-say/styles/textarea.scss
index a5bfbe6695..135da37e01 100644
--- a/tgui/packages/tgui-say/styles/textarea.scss
+++ b/tgui/packages/tgui-say/styles/textarea.scss
@@ -1,11 +1,51 @@
+@use 'sass:color';
+@use './colors.scss';
+
+@supports (not (-webkit-hyphens: none)) and (not (-moz-appearance: none)) {
+ * {
+ &::-webkit-scrollbar {
+ width: 0.8rem;
+ }
+
+ &::-webkit-scrollbar-track {
+ background: color.scale(
+ colors.$button,
+ $lightness: -25% * colors.$scrollbar-color-multiplier
+ );
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: color.scale(
+ colors.$button,
+ $lightness: 10% * colors.$scrollbar-color-multiplier
+ );
+ }
+ }
+}
+
.textarea {
- align-items: center;
background: transparent;
border: none;
- display: flex;
- flex-grow: 5;
font-family: inherit;
font-size: 1.1rem;
- overflow: hidden;
- margin: 0 0 0 0.4rem;
+}
+
+// Remove conditionals with 516
+@supports (not (-webkit-hyphens: none)) and (not (-moz-appearance: none)) {
+ .textarea {
+ flex-grow: 8;
+ outline: none;
+ resize: none;
+ }
+}
+
+// Remove with 516
+@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
+ .textarea {
+ align-items: center;
+ display: flex;
+ flex-grow: 4;
+ overflow: hidden;
+ margin: 0.1rem 0 0 0.4rem;
+ }
}
diff --git a/tgui/packages/tgui-say/styles/window.scss b/tgui/packages/tgui-say/styles/window.scss
index acbe1b34d2..5d5bc7dc71 100644
--- a/tgui/packages/tgui-say/styles/window.scss
+++ b/tgui/packages/tgui-say/styles/window.scss
@@ -6,11 +6,17 @@
display: flex;
flex-direction: column;
max-width: 360px;
- height: 100%;
- width: 100%;
overflow: hidden;
}
+// Remove with 516
+@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
+ .window {
+ height: 100%;
+ width: 100%;
+ }
+}
+
.window-lightMode {
background-color: colors.$lightMode;
}
diff --git a/tgui/packages/tgui/components/Image.tsx b/tgui/packages/tgui/components/Image.tsx
index 5d3a943feb..cf510b154e 100644
--- a/tgui/packages/tgui/components/Image.tsx
+++ b/tgui/packages/tgui/components/Image.tsx
@@ -41,6 +41,7 @@ export function Image(props: Props) {
computedProps['style'] = {
...computedProps.style,
'-ms-interpolation-mode': fixBlur ? 'nearest-neighbor' : 'auto',
+ 'image-rendering': fixBlur ? '-webkit-optimize-contrast' : 'auto',
objectFit,
};
diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/misc.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/misc.tsx
index 8361e5cca2..b3e062348c 100644
--- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/misc.tsx
+++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/misc.tsx
@@ -88,3 +88,11 @@ export const AutoPunctuation: FeatureToggle = {
'When enabled, if your message ends in a letter with no punctuation, a period will be added.',
component: CheckboxInput,
};
+
+export const BrowserDevTools: FeatureToggle = {
+ name: 'Browser Dev Tools',
+ category: 'UI',
+ description:
+ 'When enabled, you can right click -> inspect to open Microsoft Edge dev tools. BYOND 516+ Only.',
+ component: CheckboxInput,
+};
diff --git a/tgui/packages/tgui/layouts/Layout.tsx b/tgui/packages/tgui/layouts/Layout.tsx
index 173ed1cbb4..f3f395e540 100644
--- a/tgui/packages/tgui/layouts/Layout.tsx
+++ b/tgui/packages/tgui/layouts/Layout.tsx
@@ -21,6 +21,7 @@ type Props = Partial<{
export function Layout(props: Props) {
const { className, theme = 'nanotrasen', children, ...rest } = props;
+ document.documentElement.className = `theme-${theme}`;
return (
diff --git a/tgui/packages/tgui/styles/components/Button.scss b/tgui/packages/tgui/styles/components/Button.scss
index a11c5c1e8c..7664470134 100644
--- a/tgui/packages/tgui/styles/components/Button.scss
+++ b/tgui/packages/tgui/styles/components/Button.scss
@@ -58,7 +58,7 @@ $bg-map: colors.$bg-map !default;
margin-bottom: base.em(2px);
// Disable selection in buttons
user-select: none;
- -ms-user-select: none;
+ -ms-user-select: none; // TODO: Remove with 516
&:last-child {
margin-right: 0;
diff --git a/tgui/packages/tgui/styles/components/Dialog.scss b/tgui/packages/tgui/styles/components/Dialog.scss
index c7b7fd1326..09adcd8f89 100644
--- a/tgui/packages/tgui/styles/components/Dialog.scss
+++ b/tgui/packages/tgui/styles/components/Dialog.scss
@@ -28,7 +28,7 @@ $background-color: base.$color-bg !default;
line-height: 1.928em;
background-color: rgba(0, 0, 0, 0.5);
user-select: none;
- -ms-user-select: none;
+ -ms-user-select: none; // TODO: Remove with 516
}
.Dialog__title {
diff --git a/tgui/packages/tgui/styles/components/Flex.scss b/tgui/packages/tgui/styles/components/Flex.scss
index d4b6b8ec38..8c0c2a3be2 100644
--- a/tgui/packages/tgui/styles/components/Flex.scss
+++ b/tgui/packages/tgui/styles/components/Flex.scss
@@ -4,7 +4,7 @@
*/
.Flex {
- display: -ms-flexbox;
+ display: -ms-flexbox; // TODO: Remove with 516
display: flex;
}
diff --git a/tgui/packages/tgui/styles/components/Input.scss b/tgui/packages/tgui/styles/components/Input.scss
index c2e779529f..bd76fe71f4 100644
--- a/tgui/packages/tgui/styles/components/Input.scss
+++ b/tgui/packages/tgui/styles/components/Input.scss
@@ -56,6 +56,13 @@ $border-radius: base.$border-radius !default;
color: $text-color;
color: inherit;
+ &::placeholder {
+ font-style: italic;
+ color: #777;
+ color: rgba(255, 255, 255, 0.45);
+ }
+
+ // TODO: Remove with 516
&:-ms-input-placeholder {
font-style: italic;
color: #777;
diff --git a/tgui/packages/tgui/styles/components/TextArea.scss b/tgui/packages/tgui/styles/components/TextArea.scss
index fa45857ed9..bef0f227ab 100644
--- a/tgui/packages/tgui/styles/components/TextArea.scss
+++ b/tgui/packages/tgui/styles/components/TextArea.scss
@@ -65,6 +65,13 @@ $border-radius: Input.$border-radius !default;
word-wrap: break-word;
overflow: hidden;
+ &::placeholder {
+ font-style: italic;
+ color: #777;
+ color: rgba(255, 255, 255, 0.45);
+ }
+
+ // TODO: Remove with 516
&:-ms-input-placeholder {
font-style: italic;
color: #777;
diff --git a/tgui/packages/tgui/styles/interfaces/IntegratedCircuit.scss b/tgui/packages/tgui/styles/interfaces/IntegratedCircuit.scss
index 7cfecb250a..fdb7d45f76 100644
--- a/tgui/packages/tgui/styles/interfaces/IntegratedCircuit.scss
+++ b/tgui/packages/tgui/styles/interfaces/IntegratedCircuit.scss
@@ -18,7 +18,7 @@ $fg-map: colors.$fg-map !default;
white-space: nowrap;
- -ms-user-select: none;
+ -ms-user-select: none; // TODO: Remove with 516
user-select: none;
}
@@ -26,7 +26,7 @@ $fg-map: colors.$fg-map !default;
white-space: nowrap;
background-color: rgba(0, 0, 0, 0.5);
- -ms-user-select: none;
+ -ms-user-select: none; // TODO: Remove with 516
user-select: none;
}
diff --git a/tgui/packages/tgui/styles/layouts/Layout.scss b/tgui/packages/tgui/styles/layouts/Layout.scss
index fdf6435e31..2a43402c71 100644
--- a/tgui/packages/tgui/styles/layouts/Layout.scss
+++ b/tgui/packages/tgui/styles/layouts/Layout.scss
@@ -5,12 +5,29 @@
@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;
+}
+
+// Remove with 516, IE legacy code
.Layout,
.Layout * {
- // Fancy scrollbar
+ // Remove with 516, IE legacy code
scrollbar-base-color: color.scale(
base.$color-bg,
$lightness: -25% * $scrollbar-color-multiplier
diff --git a/tgui/packages/tgui/styles/layouts/NtosWindow.scss b/tgui/packages/tgui/styles/layouts/NtosWindow.scss
index bed4abab53..7b8f9d452b 100644
--- a/tgui/packages/tgui/styles/layouts/NtosWindow.scss
+++ b/tgui/packages/tgui/styles/layouts/NtosWindow.scss
@@ -16,7 +16,7 @@
font-family: Consolas, monospace;
font-size: base.em(14px);
user-select: none;
- -ms-user-select: none;
+ -ms-user-select: none; // TODO: Remove with 516
}
.NtosWindow__content .Layout__content {
diff --git a/tgui/packages/tgui/styles/layouts/TitleBar.scss b/tgui/packages/tgui/styles/layouts/TitleBar.scss
index 1a26dd9e29..79a2d3fd4d 100644
--- a/tgui/packages/tgui/styles/layouts/TitleBar.scss
+++ b/tgui/packages/tgui/styles/layouts/TitleBar.scss
@@ -18,7 +18,7 @@ $shadow-color: rgba(0, 0, 0, 0.1) !default;
box-shadow: 0 2px 2px $shadow-color;
box-shadow: 0 base.rem(2px) base.rem(2px) $shadow-color;
user-select: none;
- -ms-user-select: none;
+ -ms-user-select: none; // TODO: Remove with 516
}
.TitleBar__clickable {
diff --git a/tgui/packages/tgui/styles/main.scss b/tgui/packages/tgui/styles/main.scss
index a79f94f9a2..ee8bde3bfa 100644
--- a/tgui/packages/tgui/styles/main.scss
+++ b/tgui/packages/tgui/styles/main.scss
@@ -80,7 +80,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;
}
diff --git a/tgui/packages/tgui/styles/themes/paper.scss b/tgui/packages/tgui/styles/themes/paper.scss
index ea9da08ffb..c61a4eca8c 100644
--- a/tgui/packages/tgui/styles/themes/paper.scss
+++ b/tgui/packages/tgui/styles/themes/paper.scss
@@ -99,6 +99,13 @@ $font-size: 24px;
color: #fff;
color: inherit;
+ &::placeholder {
+ font-style: italic;
+ color: #777;
+ color: rgba(255, 255, 255, 0.45);
+ }
+
+ // TODO: Remove with 516
&:-ms-input-placeholder {
font-style: italic;
color: #777;