Skip to content

Commit be22233

Browse files
committed
scroll_bar: Flip max-width queries for min-width.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent c2e3d62 commit be22233

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

static/js/scroll_bar.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ exports.initialize = function () {
4242
if (sbWidth > 0) {
4343
$(".header").css("left", "-" + sbWidth + "px");
4444
$(".header-main").css("left", sbWidth + "px");
45-
$(".header-main .column-middle").css("margin-right", 250 + sbWidth + "px");
45+
$(".header-main .column-middle").css("margin-right", 7 + sbWidth + "px");
4646

4747
$(".fixed-app").css("left", "-" + sbWidth + "px");
48-
$(".fixed-app .column-middle").css("margin-left", 250 + sbWidth + "px");
48+
$(".fixed-app .column-middle").css("margin-left", 7 + sbWidth + "px");
4949

5050
$(".column-right").css("right", sbWidth + "px");
5151
$(".app-main .right-sidebar").css({
@@ -54,19 +54,19 @@ exports.initialize = function () {
5454
});
5555

5656
$("#compose").css("left", "-" + sbWidth + "px");
57-
$(".compose-content").css({left: sbWidth + "px", "margin-right": 250 + sbWidth + "px"});
57+
$(".compose-content").css({left: sbWidth + "px", "margin-right": 7 + sbWidth + "px"});
5858
$("#keyboard-icon").css({right: sbWidth + 35 + "px"});
5959

6060
$("head").append(
61-
"<style> @media (max-width: " +
62-
media_breakpoints.xl_max +
61+
"<style> @media (min-width: " +
62+
media_breakpoints.xl_min +
6363
") { .compose-content, .header-main .column-middle { margin-right: " +
64-
(7 + sbWidth) +
64+
(250 + sbWidth) +
6565
"px !important; } } " +
66-
"@media (max-width: " +
67-
media_breakpoints.md_max +
66+
"@media (min-width: " +
67+
media_breakpoints.md_min +
6868
") { .fixed-app .column-middle { margin-left: " +
69-
(7 + sbWidth) +
69+
(250 + sbWidth) +
7070
"px !important; } } " +
7171
"</style>",
7272
);

0 commit comments

Comments
 (0)