From 9245850dd7ee7d4ed0a56bd94ff3370b6370dec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WilhanTian=20=20=E7=94=B0=E4=BC=9F=E6=B1=89?= Date: Wed, 25 Aug 2021 17:38:24 +0800 Subject: [PATCH] fixed resolve font path errors (#3048) fixed resolve font path errors & format code --- website/docs/zh-CN/custom-theme.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/docs/zh-CN/custom-theme.md b/website/docs/zh-CN/custom-theme.md index c35cc1d5fd..9247836abe 100644 --- a/website/docs/zh-CN/custom-theme.md +++ b/website/docs/zh-CN/custom-theme.md @@ -13,9 +13,11 @@ Element Plus 默认提供一套主题,CSS 命名采用 BEM 的风格,方便 Element Plus 的 theme-chalk 使用 SCSS 编写,如果你的项目也使用了 SCSS,那么可以直接在项目中改变 Element Plus 的样式变量。新建一个样式文件,例如 `element-variables.scss`,写入以下内容: ```html -/* 改变主题色变量 */ $--color-primary: teal; /* 改变 icon 字体路径变量,必需 */ -$--font-path: '~element-plus/lib/theme-chalk/fonts'; @import -"~element-plus/packages/theme-chalk/src/index"; +/* 改变主题色变量 */ +$--color-primary: teal; +/* 改变 icon 字体路径变量,必需 */ +$--font-path: "~element-plus/theme-chalk/fonts"; +@import "~element-plus/packages/theme-chalk/src/index"; ``` 之后,在项目的入口文件中,直接引入以上样式文件即可(无需引入 Element Plus 编译好的 CSS 文件):