WordPress/wp-content/themes/twentytwentyone/postcss.config.js
ryelle 524d6bb167 Twenty Twenty-One: Remove duplicate CSS rules.
Introduces a new PostCSS plugin, `postcss-discard-duplicates`, which will automatically remove any duplicate CSS rules. All the CSS that is removed shows up again later in the file. This also fixes a bug from `postcss-css-variables`, where media queries are duplicated.

Fixes #52158.
Props poena.


Built from https://develop.svn.wordpress.org/trunk@49980


git-svn-id: http://core.svn.wordpress.org/trunk@49681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-18 17:53:09 +00:00

14 lines
249 B
JavaScript

module.exports = {
plugins: [
require('postcss-nested'),
require('postcss-css-variables')({
preserve: false,
preserveAtRulesOrder: true
}),
require('postcss-calc')({
precision: 0
}),
require('postcss-discard-duplicates')
]
};