Skip to content

Commit

Permalink
feat(ui): switch fonts to DM Sans and DM Mono to align with Nuxt'…
Browse files Browse the repository at this point in the history
…s theme
  • Loading branch information
antfu committed Sep 27, 2023
1 parent 88220f0 commit 43c5b47
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
10 changes: 7 additions & 3 deletions packages/devtools-ui-kit/src/unocss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
Expand All @@ -25,9 +26,6 @@ export function unocssPreset(): Preset {
primary: '#099e61',
context: 'rgba(var(--nui-c-context),%alpha)',
},
fontFamily: {
sans: 'Avenir, Helvetica, Arial, sans-serif',
},
}),
rules: [
[/^n-(.*)$/, ([, body]: string[], { theme }: RuleContext<Theme>) => {
Expand Down Expand Up @@ -177,6 +175,12 @@ export function extendUnocssOptions(user: UnocssNuxtOptions = {}): UnocssNuxtOpt
},
// ...(user?.icons || {})
}),
presetWebFonts({
fonts: {
sans: 'DM Sans',
mono: 'DM Mono',
},
}),
unocssPreset(),
...(user.presets || []),
],
Expand Down
9 changes: 0 additions & 9 deletions packages/devtools-ui-kit/unocss.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/devtools/client/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ registerCommands(() =>
</script>

<template>
<div fixed inset-0 h-screen w-screen>
<div fixed inset-0 h-screen w-screen font-sans>
<NuxtLoadingIndicator />
<Notification />
<NLoading v-if="waiting">
Expand Down
7 changes: 5 additions & 2 deletions packages/devtools/client/unocss.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export default defineConfig({
}),
presetWebFonts({
fonts: {
sans: 'Inter:400,500',
mono: 'Fira Code',
sans: 'DM Sans',
mono: 'DM Mono',
stylish: 'Caveat',
},
}),
Expand All @@ -52,4 +52,7 @@ export default defineConfig({
'simple-icons-nuxtdotjs',
'bxl-visual-studio',
],
configDeps: [
'../../packages/devtools-ui-kit/src/unocss.ts',
],
})
12 changes: 11 additions & 1 deletion uno.config.ts
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
export { default } from './packages/devtools/client/unocss.config'
import { defineConfig } from 'unocss'

import config from './packages/devtools/client/unocss.config'

export default defineConfig({
...config,
configDeps: [
'./packages/devtools-ui-kit/src/unocss.ts',
'./packages/devtools/client/unocss.config.ts',
],
})

0 comments on commit 43c5b47

Please sign in to comment.