scroll_bar: Use a CSS class to toggle fluid layout.

This commit is contained in:
Aman Agrawal
2023-05-28 09:51:00 +00:00
committed by Tim Abbott
parent d03e72bc0e
commit 0457f6807c
2 changed files with 10 additions and 2 deletions

View File

@@ -4,9 +4,9 @@ import {user_settings} from "./user_settings";
export function set_layout_width(): void {
if (user_settings.fluid_layout_width) {
$(".header-main, .app .app-main, #compose-container").css("max-width", "inherit");
$("body").addClass("fluid_layout_width");
} else {
$(".header-main, .app .app-main, #compose-container").css("max-width", "1400px");
$("body").removeClass("fluid_layout_width");
}
}

View File

@@ -27,6 +27,14 @@ body {
color: var(--color-text-default);
background-color: var(--color-background);
transition: background-color 200ms linear;
&.fluid_layout_width {
.header-main,
.app .app-main,
#compose-container {
max-width: 1400px;
}
}
}
:root {