Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

scroll_bar: Use a CSS class to toggle fluid layout.

Aman Agrawal0457f6807c9c
diff --git a/web/src/scroll_bar.ts b/web/src/scroll_bar.ts
index 8d898a49e2a..485e86d00f9 100644
--- a/web/src/scroll_bar.ts
+++ b/web/src/scroll_bar.ts
@@ -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");
}
}
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index d07b1c00d59..09b2a2de5d7 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -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 {