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-11-18 10:58:39 +01:00
|
|
|
(file.basename ?? path.basename(file)) === "dark_theme.css" &&
|
2021-08-10 11:08:42 +02:00
|
|
|
// 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")({
|
2023-02-16 10:58:23 +01:00
|
|
|
plugins: [require("postcss-prefixwrap")("%dark-theme")],
|
2021-08-10 11:08:42 +02:00
|
|
|
}),
|
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
|
|
|
});
|