unocss-preset-scrollbar icon indicating copy to clipboard operation
unocss-preset-scrollbar copied to clipboard

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

Open bosens-China opened this issue 4 months ago • 0 comments

  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;
}

bosens-China avatar Oct 01 '24 07:10 bosens-China