unpreset / unocss-preset-scrollbar

Scrollbar for UnoCSS preset.
MIT License
53 stars 3 forks source link

[unocss] unmatched utility "scrollbar-width-auto" in shortcut "scrollbar" [unocss] unmatched utility "scrollbar-color-[var(--scrollbar-thumb)_var(--scrollbar-track)]" in shortcut "scrollbar" #16

Open bosens-China opened 1 month ago

bosens-China commented 1 month ago
  1. 按照文档安装依赖
  2. uno.config.ts
import {
  defineConfig,
  presetUno,
  presetIcons,
  transformerDirectives,
} from 'unocss';
import { presetScrollbar } from 'unocss-preset-scrollbar';

export default defineConfig({
  content: {
    filesystem: ['./src/**/*.{html,js,ts,jsx,tsx}'],
  },
  presets: [presetUno(), presetIcons(), presetScrollbar()],
  transformers: [transformerDirectives()],
});
  1. global.less
html,
body {
  @apply scrollbar scrollbar-rounded;
}
murphy-wei commented 3 days ago

+1