mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 07:18:57 +00:00
3c449a9017
Extract theme tokens, shortcuts, blocklist, safelist, and icon configuration from uno.config.ts into a reusable workspace package at packages/unocss-preset/. - Create @hugo-fixit/unocss-preset with presetFixIt and createFixItConfig() - Simplify uno.config.ts to use createFixItConfig() with content/cli overrides - Move unocss, @iconify/json from root devDependencies to preset package
@hugo-fixit/unocss-preset
UnoCSS preset for the FixIt Hugo theme. Provides theme tokens, shortcuts, blocklist, safelist, and icon configuration.
Exports
presetFixIt— the main UnoCSS preset (theme breakpoints/colors, z-index shortcuts, blocklist, safelist)createFixItConfig(options?)— creates a complete UnoCSS config combiningpresetWind3,presetIcons(lucide + octicon), andpresetFixIt
Usage
// uno.config.ts
import { createFixItConfig } from '@hugo-fixit/unocss-preset'
export default createFixItConfig({
overrides: {
content: {
filesystem: ['layouts/**/*.html'],
},
},
})
Options
| Option | Type | Description |
|---|---|---|
presets |
PresetOrFactoryAwaitable[] |
Additional UnoCSS presets to include |
overrides |
Partial<UserConfig> |
Override or extend the generated config |
Theme
Breakpoints (min-width, mobile-first)
| Token | Value |
|---|---|
sm |
680px |
md |
960px |
lg |
1200px |
xl |
1440px |
Use max-sm: prefix for xs (< 680px).
Colors (CSS custom properties)
primary, secondary, success, info, warning, danger — mapped to var(--fi-*).
Shortcuts
Semantic z-index utilities mirroring core/mixins/_z-index.scss:
| Shortcut | Utility |
|---|---|
z-hide |
z--1 |
z-auto |
z-auto |
z-base |
z-1 |
z-loading |
z-10 |
z-sticky |
z-100 |
z-fixed |
z-200 |