Nimiq CSS in UnoCSS
A preset with everything ready to use Nimiq CSS in your UnoCSS project.
Icons
You can add the Nimiq icons to your project by importing the Nimiq icons CSS file.
css
@import 'nimiq-css/css/icons.css' @layer nq-icons;
Fonts
By default, UnoCSS will leverage Web Fonts Preset to download the fonts and create a folder in your project with the fonts.
Changing the fonts path
You can customize how the fonts are serve locally by passing the options for createLocalFontProcessor
.
ts
import { presetNimiq } from 'nimiq-css'
import { defineConfig } from 'unocss'
export default defineConfig({
presets: [
presetNimiq({
fonts: {
fontAssetsDir: './my-custom/assets/fonts', // default is `./public/fonts`
fontServeBaseUrl: '/my-custom/assets/fonts', // default is `assets/fonts`
}
})
]
})
Disable fonts
ts
import { presetNimiq } from 'nimiq-css'
import { defineConfig } from 'unocss'
export default defineConfig({
presets: [
presetNimiq({
fonts: false
})
]
})