forked from yuguaa/chrome-extension-package
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwindcss-presets.js
45 lines (45 loc) · 1.01 KB
/
tailwindcss-presets.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
39
40
41
42
43
44
45
const plugin = require('tailwindcss/plugin')
const spacings = []
for (let i = 0; i <= 100; i++) {
spacings.push(i * 2)
}
const spacingsSettings = spacings.reduce((pre, cur) => {
pre[cur] = cur + 'px'
return pre
}, {})
module.exports = {
theme: {
extend: {
colors: {}
},
spacing: {
1: '1px',
...spacingsSettings
}
},
plugins: [
plugin(function ({ addBase, addUtilities }) {
addBase({
'html,body,#app': {
fontFamily: 'Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif',
height: '100%'
}
})
addUtilities({
'.scrollbar-common': {
'&::-webkit-scrollbar-track-piece': {
background: '#d3dce6'
},
'&::-webkit-scrollbar': {
width: '6px',
height: '6px'
},
'&::-webkit-scrollbar-thumb': {
background: '#99a9bf',
'border-radius': '20px'
}
}
})
})
]
}