mirror of https://github.com/zulip/zulip.git
postcss: Convert plugins object to an array.
Since order matters for plugins, its better to use the Array syntax to pass plugins to the PostCSS instead of Object. This also allows us to reliably add more plugins programatically if we so choose. [anders@zulip.com: Adjust to work with postcss-cli.] Co-authored-by: Anders Kaseorg <anders@zulip.com> Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
9bed17e0ab
commit
62188e8036
|
@ -3,15 +3,12 @@
|
|||
const {media_breakpoints} = require("./static/js/css_variables");
|
||||
|
||||
module.exports = {
|
||||
plugins: {
|
||||
// Warning: despite appearances, order is significant
|
||||
"postcss-nested": {},
|
||||
"postcss-extend-rule": {},
|
||||
"postcss-simple-vars": {
|
||||
variables: media_breakpoints,
|
||||
},
|
||||
"postcss-calc": {},
|
||||
"postcss-media-minmax": {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
plugins: [
|
||||
require("postcss-nested"),
|
||||
require("postcss-extend-rule"),
|
||||
require("postcss-simple-vars")({variables: media_breakpoints}),
|
||||
require("postcss-calc"),
|
||||
require("postcss-media-minmax"),
|
||||
require("autoprefixer"),
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue