mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
postcss-simple-vars: Add media query breakpoint variables.
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
const {media_breakpoints} = require("./static/js/css_variables.js");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
// Warning: despite appearances, order is significant
|
// Warning: despite appearances, order is significant
|
||||||
"postcss-nested": {},
|
"postcss-nested": {},
|
||||||
"postcss-extend-rule": {},
|
"postcss-extend-rule": {},
|
||||||
"postcss-simple-vars": {},
|
"postcss-simple-vars": {
|
||||||
|
variables: media_breakpoints,
|
||||||
|
},
|
||||||
"postcss-calc": {},
|
"postcss-calc": {},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
|
|||||||
24
static/js/css_variables.js
Normal file
24
static/js/css_variables.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
"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;
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
media_breakpoints: {
|
||||||
|
"xs-min": xs + "px",
|
||||||
|
"sm-min": sm + "px",
|
||||||
|
"md-min": md + "px",
|
||||||
|
"lg-min": lg + "px",
|
||||||
|
"xl-min": xl + "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",
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -52,6 +52,7 @@ EXEMPT_FILES = {
|
|||||||
'static/js/confirm_dialog.js',
|
'static/js/confirm_dialog.js',
|
||||||
'static/js/copy_and_paste.js',
|
'static/js/copy_and_paste.js',
|
||||||
'static/js/csrf.js',
|
'static/js/csrf.js',
|
||||||
|
'static/js/css_variables.js',
|
||||||
'static/js/debug.js',
|
'static/js/debug.js',
|
||||||
'static/js/desktop_integration.js',
|
'static/js/desktop_integration.js',
|
||||||
'static/js/drafts.js',
|
'static/js/drafts.js',
|
||||||
|
|||||||
Reference in New Issue
Block a user