Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
postcss_vars: Use underscore to follow better naming convention.
Aman Agrawalf8aea9aecb14
diff --git a/static/js/css_variables.js b/static/js/css_variables.jsindex bb802ea2db5..3b1aa830f39 100644--- a/static/js/css_variables.js+++ b/static/js/css_variables.js@@ -14,22 +14,22 @@ const ms = 320; // Mobile smallmodule.exports = {media_breakpoints: {- "xs-min": xs + "px",- "sm-min": sm + "px",- "md-min": md + "px",- "lg-min": lg + "px",- "xl-min": xl + "px",- "ml-min": ml + "px",- "mm-min": mm + "px",- "ms-min": ms + "px",+ xs_min: xs + "px",+ sm_min: sm + "px",+ md_min: md + "px",+ lg_min: lg + "px",+ xl_min: xl + "px",+ ml_min: ml + "px",+ mm_min: mm + "px",+ ms_min: ms + "px",- "xs-max": xs - 1 + "px",- "sm-max": sm - 1 + "px",- "md-max": md - 1 + "px",- "lg-max": lg - 1 + "px",- "xl-max": xl - 1 + "px",- "ml-max": ml - 1 + "px",- "mm-max": mm - 1 + "px",- "ms-max": ms - 1 + "px",+ xs_max: xs - 1 + "px",+ sm_max: sm - 1 + "px",+ md_max: md - 1 + "px",+ lg_max: lg - 1 + "px",+ xl_max: xl - 1 + "px",+ ml_max: ml - 1 + "px",+ mm_max: mm - 1 + "px",+ ms_max: ms - 1 + "px",},};diff --git a/static/js/message_viewport.js b/static/js/message_viewport.jsindex 789a62ac25c..a735ec8bab1 100644--- a/static/js/message_viewport.js+++ b/static/js/message_viewport.js@@ -307,7 +307,7 @@ exports.is_narrow = function () {// This basically returns true when we hide the right sidebar for// the left_side_userlist skinny mode. It would be nice to have a less brittle// test for this.- return window.innerWidth <= media_breakpoints["xl-max"];+ return window.innerWidth <= media_breakpoints.xl_max;};exports.system_initiated_animate_scroll = function (scroll_amount) {diff --git a/static/js/scroll_bar.js b/static/js/scroll_bar.jsindex ba7d72bd1c1..20a0748548a 100644--- a/static/js/scroll_bar.js+++ b/static/js/scroll_bar.js@@ -59,12 +59,12 @@ exports.initialize = function () {$("head").append("<style> @media (max-width: " +- media_breakpoints["xl-max"] ++ media_breakpoints.xl_max +") { .compose-content, .header-main .column-middle { margin-right: " +(7 + sbWidth) +"px !important; } } " +"@media (max-width: " +- media_breakpoints["xl-max"] ++ media_breakpoints.xl_max +") { .fixed-app .column-middle { margin-left: " +(7 + sbWidth) +"px !important; } } " +diff --git a/static/styles/alerts.css b/static/styles/alerts.cssindex cc2ebedd941..d5d8037116a 100644--- a/static/styles/alerts.css+++ b/static/styles/alerts.css@@ -240,7 +240,7 @@ $alert-error-red: hsl(0, 80%, 40%);}/* @media queries */-@media (max-width: $lg-max) {+@media (max-width: $lg_max) {.alert-box {width: 80%;left: 10%;diff --git a/static/styles/app_components.css b/static/styles/app_components.cssindex 050cba17f74..bb6cc6f8a69 100644--- a/static/styles/app_components.css+++ b/static/styles/app_components.css@@ -268,7 +268,7 @@.stream_sorter_toggle {margin-left: auto;- @media (max-width: $lg-max) {+ @media (max-width: $lg_max) {margin-left: unset;}}@@ -390,7 +390,7 @@}}-@media (max-width: $md-max) {+@media (max-width: $md_max) {/* Override Bootstrap's responsive grid to display input at full width */.input-append .stream-list-filter {/* Input width = 100% - 10px margin x2 - 6px padding x2 - 1px border x2. */diff --git a/static/styles/compose.css b/static/styles/compose.cssindex b6e1180b63e..dcfa2782b29 100644--- a/static/styles/compose.css+++ b/static/styles/compose.css@@ -16,7 +16,7 @@line-height: 1em;}- @media (min-width: $sm-min) {+ @media (min-width: $sm_min) {display: none;}}@@ -33,7 +33,7 @@display: none;}- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {.compose_stream_button,.compose_private_button {display: none;@@ -497,20 +497,20 @@ a#undo_markdown_preview {}/* This max-width must be synced with message_viewport.is_narrow */-@media (max-width: $xl-max) {+@media (max-width: $xl_max) {.compose-content {margin-right: 7px;}}-@media (max-width: $md-max) {+@media (max-width: $md_max) {.compose-content {margin-right: 7px;margin-left: 7px;}}-@media (max-width: $mm-max) {+@media (max-width: $mm_max) {#stream_message_recipient_topic.recipient_box {width: calc(100% - 175px);min-width: 95px;diff --git a/static/styles/drafts.css b/static/styles/drafts.cssindex 36dfd4a5d7b..5a549c4beea 100644--- a/static/styles/drafts.css+++ b/static/styles/drafts.css@@ -11,7 +11,7 @@display: flex;flex-direction: column;- @media (max-width: $md-max) {+ @media (max-width: $md_max) {height: 95%;max-width: none;width: 90%;@@ -111,7 +111,7 @@right: -80px;font-size: 0.9em;- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {right: 0;}diff --git a/static/styles/informational_overlays.css b/static/styles/informational_overlays.cssindex 7131518f45e..ef5bddd2569 100644--- a/static/styles/informational_overlays.css+++ b/static/styles/informational_overlays.css@@ -122,7 +122,7 @@margin-bottom: 10px !important;}-@media only screen and (max-width: $md-max) {+@media only screen and (max-width: $md_max) {.informational-overlays {.overlay-content {width: calc(100% - 20px);diff --git a/static/styles/lightbox.css b/static/styles/lightbox.cssindex 42fc4fa104c..7f0552be3ae 100644--- a/static/styles/lightbox.css+++ b/static/styles/lightbox.css@@ -253,7 +253,7 @@}}-@media only screen and (min-width: $ms-min) and (max-width: $md-max) {+@media only screen and (min-width: $ms_min) and (max-width: $md_max) {#lightbox_overlay {.image-actions {float: left;diff --git a/static/styles/popovers.css b/static/styles/popovers.cssindex 446dc4d518b..c80b24e3374 100644--- a/static/styles/popovers.css+++ b/static/styles/popovers.css@@ -353,7 +353,7 @@ ul {}}-@media (max-width: $md-max) {+@media (max-width: $md_max) {.message-info-popover,.user-info-popover {display: flex !important;@@ -402,7 +402,7 @@ ul {pointer-events: all;}- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {.popover-inner {width: 70%;}diff --git a/static/styles/recent_topics.css b/static/styles/recent_topics.cssindex df788f936b7..bac3b8968d6 100644--- a/static/styles/recent_topics.css+++ b/static/styles/recent_topics.css@@ -11,7 +11,7 @@display: flex;flex-direction: column;- @media (max-width: $md-max) {+ @media (max-width: $md_max) {height: 95%;max-width: none;width: 90%;@@ -279,7 +279,7 @@white-space: nowrap;}- @media (max-width: $md-max) {+ @media (max-width: $md_max) {/* Hide participants and last message timeon smaller screens. This ensures user alwayshas a nice UI experience. */diff --git a/static/styles/rendered_markdown.css b/static/styles/rendered_markdown.cssindex bc57a2d6304..9ddeda41b91 100644--- a/static/styles/rendered_markdown.css+++ b/static/styles/rendered_markdown.css@@ -464,7 +464,7 @@right: 12px;}-@media (max-width: $sm-max) {+@media (max-width: $sm_max) {.rendered_markdown .message_embed {height: auto;diff --git a/static/styles/right_sidebar.css b/static/styles/right_sidebar.cssindex 317c9a47780..4e1331a857b 100644--- a/static/styles/right_sidebar.css+++ b/static/styles/right_sidebar.css@@ -196,7 +196,7 @@}/* This max-width must be synced with message_viewport.is_narrow */-@media (max-width: $xl-max) {+@media (max-width: $xl_max) {#sidebar-keyboard-shortcuts {/* This is supposed to fix this appearing improperly in narrowwindows. It's likely the wrong solution; a proper fix likely@@ -210,14 +210,14 @@}}-@media (max-width: $md-max) {+@media (max-width: $md_max) {#user_search_section .user-list-filter {/* input should be 100% - 6px padding x2 - 1px border x2. */width: calc(100% - 12px - 2px);}}-@media (max-width: $sm-max) {+@media (max-width: $sm_max) {#userlist-toggle {height: 30px;line-height: 30px;diff --git a/static/styles/settings.css b/static/styles/settings.cssindex 1a7104b00cd..880d44454f2 100644--- a/static/styles/settings.css+++ b/static/styles/settings.css@@ -1761,7 +1761,7 @@ body:not(.night-mode) #settings_page .custom_user_field .datepicker {margin: 20px;}-@media (max-width: $lg-max) {+@media (max-width: $lg_max) {.user-avatar-section,.realm-icon-section {float: none;@@ -1784,7 +1784,7 @@ body:not(.night-mode) #settings_page .custom_user_field .datepicker {/* This value needs to match with the same in subscriptions.css, aswe have some shared styles declared there */-@media (max-width: $md-max) {+@media (max-width: $md_max) {#settings_overlay_container {/* this variable allows JavaScript to detect this media query */--single-column: yes;@@ -1878,7 +1878,7 @@ body:not(.night-mode) #settings_page .custom_user_field .datepicker {}}-@media only screen and (max-width: $lg-max) {+@media only screen and (max-width: $lg_max) {/* Show bot-information-box at full width on smallscreen sizes. Not having this media query breaks theinformation box */diff --git a/static/styles/subscriptions.css b/static/styles/subscriptions.cssindex 4cc21eefd36..9b194ea0dee 100644--- a/static/styles/subscriptions.css+++ b/static/styles/subscriptions.css@@ -1087,7 +1087,7 @@ ul.grey-box {}}-@media (max-width: $lg-max) {+@media (max-width: $lg_max) {.subscriptions-container {max-width: 95%;}@@ -1103,7 +1103,7 @@ ul.grey-box {}}-@media (max-width: $lg-max) {+@media (max-width: $lg_max) {.subscriptions-container .left .search-container {flex-wrap: wrap;justify-content: space-evenly;@@ -1119,7 +1119,7 @@ ul.grey-box {Longer-term we should extract this logic two-column-overlay classto read more naturally. */-@media (max-width: $md-max) {+@media (max-width: $md_max) {.subscriptions-container {position: relative;overflow: hidden;@@ -1180,7 +1180,7 @@ ul.grey-box {}}-@media (max-width: $sm-max) {+@media (max-width: $sm_max) {#subscription_overlay .subscription_settings .button-group {display: block;float: unset;diff --git a/static/styles/typing_notifications.css b/static/styles/typing_notifications.cssindex 6b710824e9b..bb849c8cd94 100644--- a/static/styles/typing_notifications.css+++ b/static/styles/typing_notifications.css@@ -11,13 +11,13 @@}/* This max-width must be synced with message_viewport.is_narrow */-@media (max-width: $xl-max) {+@media (max-width: $xl_max) {#typing_notifications {margin-right: 7px;}}-@media (max-width: $md-max) {+@media (max-width: $md_max) {#typing_notifications {margin-right: 7px;margin-left: 7px;diff --git a/static/styles/zulip.css b/static/styles/zulip.cssindex 61469694ebe..4e7b97febf0 100644--- a/static/styles/zulip.css+++ b/static/styles/zulip.css@@ -1584,7 +1584,7 @@ div.focused_table {padding: 12px 6px;overflow: hidden;text-overflow: ellipsis;- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {padding: 7px 3.5px; /* based on having ~41.66% decrease */}i {@@ -1639,14 +1639,14 @@ div.focused_table {height: 50%;color: hsl(0, 0%, 88%);font-size: 20px;- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {top: 10%;}}&::before {left: -3px;- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {/* this ensures the before "|" doesn't overlapwith the stream name text on small narrows */left: 0;@@ -1671,7 +1671,7 @@ div.focused_table {padding: 12px 0;padding-left: 10px;- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {padding: 7px 0;padding-left: 10px;}@@ -1689,7 +1689,7 @@ div.focused_table {font-size: 20px;padding: 10px 15px 0 0;- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {padding: 5px 15px 0 0;}}@@ -1827,13 +1827,13 @@ div.focused_table {padding: 0;}- @media (min-width: $sm-min) {+ @media (min-width: $sm_min) {.pill {padding: 2px 0 2px 0 !important;font-size: 14px;}}- @media (max-width: $sm-max) {+ @media (max-width: $sm_max) {#search_arrows .pill {line-height: 20px;@@ -2600,7 +2600,7 @@ select.inline_select_topic_edit {}/* This max-width must be synced with message_viewport.is_narrow */-@media (max-width: $xl-max) {+@media (max-width: $xl_max) {.app-main,.header-main {min-width: 750px;@@ -2680,7 +2680,7 @@ select.inline_select_topic_edit {}}-@media (max-width: $md-max) {+@media (max-width: $md_max) {body {padding: 0;}@@ -2778,7 +2778,7 @@ select.inline_select_topic_edit {}}-@media (max-width: $sm-max) {+@media (max-width: $sm_max) {.column-right.expanded .right-sidebar,.column-left.expanded .left-sidebar {margin-top: 31px;