-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpostcss.config.js
38 lines (37 loc) · 1015 Bytes
/
postcss.config.js
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
36
37
38
const { fromString, fromRgba } = require("css-color-converter");
module.exports = {
plugins: {
"postcss-mixins": {
mixins: {
'breakpoint-up': (mixin, min) => ({
[`@media (min-width: ${min})`]: {
"@mixin-content": {},
},
}),
'breakpoint-down': (mixin, max) => ({
[`@media (max-width: calc(${max} - 2px))`]: {
"@mixin-content": {},
},
}),
'breakpoint-between': (mixin, min, max) => ({
[`@media (min-width: ${min}) and (max-width: calc(${max} - 1px))`]: {
"@mixin-content": {},
},
}),
},
},
"postcss-import": {},
"tailwindcss/nesting": {},
tailwindcss: {},
autoprefixer: {},
"postcss-functions": {
functions: {
'to-rgba': (value, frac) => {
const rgba = fromString(value).toRgbaArray();
rgba[3] = parseFloat(frac);
return fromRgba(rgba).toHexString();
},
},
},
},
};