2020-08-01 03:43:15 +02:00
|
|
|
"use strict";
|
|
|
|
|
2021-08-10 11:08:42 +02:00
|
|
|
const path = require("path");
|
|
|
|
|
2021-06-08 04:14:11 +02:00
|
|
|
const {media_breakpoints} = require("./static/js/css_variables");
|
2020-10-31 08:54:37 +01:00
|
|
|
|
2021-08-10 11:08:42 +02:00
|
|
|
module.exports = ({file}) => ({
|
2021-08-10 10:59:46 +02:00
|
|
|
plugins: [
|
2021-08-10 11:08:42 +02:00
|
|
|
(file.basename ?? path.basename(file)) === "night_mode.css" &&
|
|
|
|
// Add postcss-import plugin with postcss-prefixwrap to handle
|
|
|
|
// the flatpickr dark theme. We do this because flatpickr themes
|
|
|
|
// are not scoped. See https://github.com/flatpickr/flatpickr/issues/2168.
|
|
|
|
require("postcss-import")({
|
|
|
|
plugins: [require("postcss-prefixwrap")("%night-mode-block")],
|
|
|
|
}),
|
2021-08-10 10:59:46 +02:00
|
|
|
require("postcss-nested"),
|
|
|
|
require("postcss-extend-rule"),
|
|
|
|
require("postcss-simple-vars")({variables: media_breakpoints}),
|
|
|
|
require("postcss-calc"),
|
|
|
|
require("postcss-media-minmax"),
|
|
|
|
require("autoprefixer"),
|
|
|
|
],
|
2021-08-10 11:08:42 +02:00
|
|
|
});
|