Avatar 灵的梦境

Back

UnoCSS & Styles

Change the appearance of the site & create custom styles

UnoCSS Change Appearance#

You can customize the theme default UnoCSS palette by modifying the CSS file at src/assets/styles/app.css. For example, if you want to change the default theme color, you can modify the following code:

src/assets/styles/app.css
:root {
  /* ... */
  --primary: 200 29% 45%; 
  --primary: <Your favorite color using raw hsl>; 
}
css

And the same way to change the default font family, you can modify the following code:

src/assets/styles/app.css
:root {
  /* ... */
  font-family: 'Satoshi'; 
  src: url('/fonts/Satoshi-Variable.ttf'); 
  font-family: '<Your favorite font family>'; 
  src: url('/fonts/<Your favorite font>.ttf'); 
}
css

Make sure to put your custom font file in the public/fonts directory.

UnoCSS Configuration#

File: uno.config.ts

Get to know more:

@unocss/preset-typography#

Typography config can be modified in uno.config.ts:

uno.config.ts
const typographyConfig = {
  // prettier-ignore
  cssExtend: { 
    // ...
  }
}
js

But if you want to customize the typography by UnoCSS, or just change the preset typography theme, you can do it in src/site.config.ts:

src/site.config.ts
export const integ: IntegrationUserConfig = {
  // ...
  typography: {
    class: 'prose text-base text-muted-foreground'
  }
}
ts

Checkout Typography preset for more.

帮助与支持

这篇文档有帮助吗?

请给我们反馈以改进文档质量
(点击按钮后会打开邮箱)

帮助改进文档

所有文档均开源,发现问题或不清楚的地方?提交 PR 来帮助改进。

编辑此页面 了解如何贡献 →

需要更多帮助?

加入社区或直接联系获取支持

探索更多

发现知识库中的更多指南与资源