Skip to content

Commit b7aaf27

Browse files
committed
Disable minifying CSS zero units
There seems to be a bug in clean-css that removes units from 0's when in CSS functions. The calc() function requires a unit, even when the value is 0.
1 parent 02c4061 commit b7aaf27

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

postcss.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ module.exports = {
33
require('tailwindcss'),
44
require('autoprefixer'),
55
...(process.env.NODE_ENV === 'production'
6-
? [require(`postcss-clean`)]
6+
? [
7+
require('postcss-clean')({
8+
compatibility: {
9+
properties: {
10+
zeroUnits: false,
11+
},
12+
},
13+
}),
14+
]
715
: []),
816
],
917
};

0 commit comments

Comments
 (0)