Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ts: Convert css_variables.js to TypeScript.
sbansal19995f4bdfe6bc33
diff --git a/tools/test-js-with-node b/tools/test-js-with-nodeindex c4603374743..d004a8ab787 100755--- a/tools/test-js-with-node+++ b/tools/test-js-with-node@@ -73,7 +73,7 @@ EXEMPT_FILES = make_set("web/src/confirm_dialog.js","web/src/copy_and_paste.js","web/src/csrf.ts",- "web/src/css_variables.js",+ "web/src/css_variables.ts","web/src/dark_theme.js","web/src/debug.js","web/src/deprecated_feature_notice.js",diff --git a/web/src/css_variables.js b/web/src/css_variables.jsdeleted file mode 100644index 7adee87dd1d..00000000000--- a/web/src/css_variables.js+++ /dev/null@@ -1,39 +0,0 @@-/* eslint-env commonjs */--"use strict";--// Media query breakpoints according to Bootstrap 4.5-const xs = 0;-const sm = 576;-const md = 768;-const lg = 992;-const xl = 1200;--// Breakpoints for mobile devices used by Google Chrome as of Version 86-const ml = 425; // Mobile large-const mm = 375; // Mobile medium-const ms = 320; // Mobile small--module.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",- },-- media_breakpoints_num: {- xs,- sm,- md,- lg,- xl,- ml,- mm,- ms,- },-};diff --git a/web/src/css_variables.ts b/web/src/css_variables.tsnew file mode 100644index 00000000000..dcadf31e6b0--- /dev/null+++ b/web/src/css_variables.ts@@ -0,0 +1,33 @@+// Media query breakpoints according to Bootstrap 4.5+const xs = 0;+const sm = 576;+const md = 768;+const lg = 992;+const xl = 1200;++// Breakpoints for mobile devices used by Google Chrome as of Version 86+const ml = 425; // Mobile large+const mm = 375; // Mobile medium+const ms = 320; // Mobile small++export const 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`,+};++export const media_breakpoints_num = {+ xs,+ sm,+ md,+ lg,+ xl,+ ml,+ mm,+ ms,+};