Skip to content

Commit ed1fc7e

Browse files
committed
docs: update readme
1 parent 6abdff8 commit ed1fc7e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.ZH-CN.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
* 🧩 它是一个 vue 的功能扩展,让你能够在 css 文件中使用 v-bind
99
* 🌈 支持全平台打包工具构建
10-
* ⛰ 支持 css, sass, scss, less, stylus (目前暂时支持 css)
10+
* ⛰ 支持 css, sass, scss, less, stylus (目前暂时支持 css、scss)
1111
* ⚡ 轻量且快速
1212

1313
## Core Process
@@ -201,10 +201,10 @@ div[data-v-1dfefb04] {
201201
## Tips
202202

203203
### ● 转换分析时的约定规则
204-
1. `sfc` 中,如果 `@import` 指定了后缀,则根据后缀的文件进行转换分析,否则根据当前 `script` 标签的 `lang` 属性(默认 `css` )进行转换分析
205-
2. `css` 中规则:`css` 文件只能引用 `css` 文件,只会解析 `css` 后缀的文件。
204+
1. `sfc` 中,如果 `@import` 指定了后缀,则根据后缀的文件进行转换分析,否则根据当前 `script` 标签的 `lang` 属性(默认 `css` )进行转换分析
205+
2. `css` 中规则:`css` 文件只能引用 `css` 文件,只会解析 `css` 后缀的文件。
206206
3. `scss``less``stylus` 中规则:`scss``less``stylus文件可以引用` `css` 文件、以及对应的 `scss``less` 文件或 `stylus` 文件,
207-
则对同名文件的 `css` 文件和对应的预处理器后缀文件进行转换分析。
207+
优先对预处理器后缀的文件进行转换分析,如果文件不存在,则对其 `css` 文件进行分析
208208

209209
### ● sfc 中变量提取规则
210210
1. 对于 `script setup`, `unplugin-vue-cssvars` 会提取所有变量进行匹配。

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ English | [中文](https://github.com/baiwusanyu-c/unplugin-vue-cssvars/blob/mas
77

88
* 🧩 It is a function extension of vue
99
* 🌈 Compatible with multiple bundled platforms(vite、rollup、esbuild、webpack)
10-
* ⛰ Support css, sass, scss, less, stylus (temporarily support css)
10+
* ⛰ Support css, sass, scss, less, stylus (temporarily support css、scss)
1111
* ⚡ light and fast
1212

1313
## Core Process
@@ -206,7 +206,7 @@ div[data-v-1dfefb04] {
206206
otherwise the conversion analysis will be performed according to the `lang` attribute of the current `script` tag (default `css`)
207207
2. Rules in `css`: `css` files can only reference `css` files, and only files with `css` suffixes will be parsed.
208208
3. Rules in `scss`, `less`, `stylus`: `scss`, `less`, `stylus` files can refer to` `css` files, and corresponding `scss` or `less` files or `stylus` files,
209-
The `css` file of the file with the same name and the corresponding preprocessor suffix file are converted and analyzed.
209+
Prioritize conversion analysis of files with preprocessor suffixes, if the file does not exist, analyze its `css` file
210210

211211
### ● Variable extraction rules in SFC
212212
1. For `script setup`, `unplugin-vue-cssvars` will extract all variables to match.

0 commit comments

Comments
 (0)