"use strict";

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: {},
    },
};

"use strict";

const {media_breakpoints} = require("./static/js/css_variables");

module.exports = {
    plugins: [
        require("postcss-nested"),
        require("postcss-extend-rule"),
        require("postcss-simple-vars")({variables: media_breakpoints}),
        require("postcss-calc"),
        require("postcss-media-minmax"),
        require("autoprefixer"),
    ],
};

Convert plugins object to an array.
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.

[dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulip.com: Adjust to work with postcss-cli.]

Co-authored-by: Anders Kaseorg <dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulip.com>
Signed-off-by: Anders Kaseorg <dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulip.com>
