mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-22 19:39:31 +08:00
30 lines
840 B
JavaScript
30 lines
840 B
JavaScript
const legacySelectors = {
|
|
postcssPlugin: "admin-chrome86-selectors",
|
|
Once(root) {
|
|
root.walkRules((rule) => {
|
|
// Chrome 86 predates :where(). The following preset expands :is() into
|
|
// ordinary selectors. Restrict this to generated selectors, not class names.
|
|
rule.selector = rule.selector.replace(/:where\(/g, ":is(")
|
|
})
|
|
},
|
|
}
|
|
|
|
module.exports = {
|
|
plugins: [
|
|
require("tailwindcss"),
|
|
legacySelectors,
|
|
require("postcss-preset-env")({
|
|
browsers: ["Chrome >= 86"],
|
|
stage: false,
|
|
features: {
|
|
"nesting-rules": true,
|
|
"is-pseudo-class": true,
|
|
"has-pseudo-class": { preserve: true },
|
|
"logical-properties-and-values": true,
|
|
"media-query-ranges": true,
|
|
},
|
|
}),
|
|
require("autoprefixer")({ overrideBrowserslist: ["Chrome >= 86"] }),
|
|
],
|
|
}
|