tailwind.config.js 1017 Bytes
Newer Older
dechen lin's avatar
dechen lin committed
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
module.exports = {
  content: [
    "./src/**/*.{js,jsx,ts,tsx}",
  ],
  plugins: [
    function ({ addUtilities }) {
      const newUtilities = {
        '.scrollbar-thin': {
          scrollbarWidth: '2px',
          // scrollbarColor: 'rgba(13, 83, 222, 1)',
          '&::-webkit-scrollbar': {
            width: '6px',
            height: '6px'
          },
          '&::-webkit-scrollbar-track': {
            backgroundColor: 'transparent'
          },
          '&::-webkit-scrollbar-thumb': {
            // backgroundColor: 'rgba(13, 83, 222, 0.01)',
            borderRadius: '20px',
            border: '3px solid transparent'
          },
          '&:hover::-webkit-scrollbar-thumb': {
            width: '6px',
            border: '3px solid rgb(229 231 235)',
            backgroundColor: 'rgb(229 231 235)'
          }
        }
        // 你可以添加更多自定义的滚动条样式
      };
      addUtilities(newUtilities, ['responsive', 'hover']);
    },
  ],
  // ...other configurations
}