2020-08-01 03:43:15 +02:00
|
|
|
"use strict";
|
|
|
|
|
2021-08-10 11:08:42 +02:00
|
|
|
const path = require("path");
|
|
|
|
|
2023-02-24 02:20:53 +01:00
|
|
|
const {media_breakpoints} = require("./src/css_variables");
|
2020-10-31 08:54:37 +01:00
|
|
|
|
2024-04-26 01:00:10 +02:00
|
|
|
const config = ({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-extend-rule"),
|
|
|
|
require("postcss-simple-vars")({variables: media_breakpoints}),
|
2023-03-17 22:15:00 +01:00
|
|
|
require("postcss-preset-env")({
|
|
|
|
features: {
|
|
|
|
"nesting-rules": true,
|
|
|
|
},
|
|
|
|
}),
|
2021-08-10 10:59:46 +02:00
|
|
|
],
|
2021-08-10 11:08:42 +02:00
|
|
|
});
|
2024-04-26 01:00:10 +02:00
|
|
|
module.exports = config;
|