forked from argyleink/open-props
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postcss.config.cjs
35 lines (32 loc) · 1.04 KB
/
postcss.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const postcssPresetEnv = require('postcss-preset-env')
const postcssImport = require('postcss-import')
const cssnano = require('cssnano')
const combineSelectors = require('postcss-combine-duplicated-selectors')
const lib = process.env.npm_lifecycle_event
const inlineMediaQueries = lib === 'lib:media' || lib === 'lib:supports'
// todo: inline MQs for 'lib:all' when it's supported better
module.exports = {
plugins: [
postcssImport(),
postcssPresetEnv({
stage: 0,
autoprefixer: false,
features: {
'logical-properties-and-values': false,
'prefers-color-scheme-query': false,
'gap-properties': false,
'custom-properties': false,
'place-properties': false,
'not-pseudo-class': false,
'focus-visible-pseudo-class': false,
'focus-within-pseudo-class': false,
'color-functional-notation': false,
'custom-media-queries': {preserve:inlineMediaQueries}
}
}),
combineSelectors(),
cssnano({
preset: 'default'
}),
]
}