Skip to content

Commit 1d5a259

Browse files
authored
Merge pull request #61 from huzhengen/posts-v22
docs(cn): translate posts/v22.md
2 parents 193586a + 161cca4 commit 1d5a259

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

posts/v22.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# WindiCSS v2.2 is here
1+
# WindiCSS v2.2 现已推出 {#windicss-v2-2-is-here}
22

3-
This is a summary version that summarizes the improvements and added features from v2.1 to v2.2.
3+
这是一个小版本更新,更新了从 v2.1 v2.2 的改进和添加的特性。
44

5-
## Features
5+
## 特性 {#features}
66

7-
- New plugin [scroll-snap](https://windicss.org/plugins/official/scroll-snap.html)
7+
- 新插件 [scroll-snap](https://cn.windicss.org/plugins/official/scroll-snap.html)
88

9-
- Support Config File When using CLI
9+
- 使用 CLI 时支持配置文件
1010

11-
- Support Exclude Config
11+
- 支持排除配置
1212

13-
> This feature is very useful when you want the same strict mode as tailwind or when you want to block a utility.
13+
> 当你希望使用与 tailwind 相同的严格模式或希望排除一个工具类时,该特性非常有用。
1414
>
1515
> ```js
1616
> // tailwind.config.js
@@ -22,24 +22,24 @@ This is a summary version that summarizes the improvements and added features fr
2222
> },
2323
> exclude: [
2424
> ...twEclude,
25-
> /^first-letter:/, // diable first-letter variant
25+
> /^first-letter:/, // 禁用 first-letter 可变修饰
2626
> ],
2727
> }
2828
> ```
2929
>
30-
> Using the above configuration, utilities like `bg-hex-1c1c1e p-4.2 m-3.33px` will not be compiled into css. You can block any utility you don't want to use by using regular expressions.
30+
> 使用上面的配置,如 `bg-hex-1c1c1e p-4.2 m-3.33px` 这些工具类将不会被编译成 css。你可以通过使用正则表达式来排除任何不想使用的工具类。
3131
32-
- Support Important Utility
32+
- 支持 important 工具类
3333
34-
> Now we support using ! symbol to mark important style.
34+
> 现在我们支持使用 ! 来标记 important 样式。
3535
>
3636
> ```html
3737
> <div class="!text-green-300 !hover:(p-4 bg-red-500)">
3838
> ...
3939
> </div>
4040
> ```
4141
>
42-
> Will be compiled as
42+
> 将被编译成
4343
>
4444
> ```css
4545
> .\!text-green-300 {
@@ -55,9 +55,9 @@ This is a summary version that summarizes the improvements and added features fr
5555
> }
5656
> ```
5757
58-
- Support Shortcuts Config
58+
- 支持 shortcuts 配置
5959
60-
> We have also added a shortcuts config to help you quickly add utilities. With this feature, you can even share inline components.
60+
> 我们还添加了一个 shortcuts 配置,以帮助你快速添加工具类。使用该特性,甚至可以共享内联组件。
6161
>
6262
> ```js
6363
> // tailwind.config.js
@@ -72,7 +72,7 @@ This is a summary version that summarizes the improvements and added features fr
7272
> }
7373
> ```
7474
>
75-
> css-in-js syntax is also supported for complex utility
75+
> 复杂的工具类也同样支持 css-in-js 语法
7676
>
7777
> ```js
7878
> // tailwind.config.js
@@ -94,38 +94,38 @@ This is a summary version that summarizes the improvements and added features fr
9494
> }
9595
> ```
9696
>
97-
> The utility added by this configuration can also be directly wrapped with variant, such as `sm:btn` . The function of this feature is similar to `@apply`, it will merge all utilities into one style.
98-
99-
- Add support for raw and min/max in custom screen definitions
100-
101-
- Add `handleIgnored` Option
102-
103-
- Add `resolveStaticUtilities` & `resolveDynamicUtilities` interface
104-
105-
- Change `Processor(path) -> Processor(require(resolve(path)))` for browser support
106-
107-
## Bug Fixes
108-
109-
- Fix lost placeholder preflight
110-
- Fix set explicit opacity value on placeholder pseudo-element
111-
- Fix add boxShadow base styles
112-
- Fix ring utility
113-
- Fix add fontFamily with array
114-
- Fix non-class styles add by addUtilities or addComponents disappears.
115-
- Fix missing aspect-ratio pseudo class
116-
- Fix --tw-ring-opacity is missing
117-
- Fix Images base styles are recommended to follow Tailwind itself
118-
- Fix long color name doesn’t works
119-
- Fix plugin config extend not works
120-
- Fix keyframes should not be wrap with variants
121-
- Fix container should not be divided
122-
- Fix keyframes should render before animation
123-
- Fix leading should render after text
124-
- Fix deep nest colors
125-
- Fix CLI can't scan only files in a subfolder on Windows
126-
- Fix user theme should replace default theme
127-
- Fix gridTemplateColumns generation
128-
- Fix custom fontSizes as String and lineHeight as second array item misbehave
129-
- Fix custom animations not working
130-
- Fix images are not working
131-
- Code format and workflow improvement
97+
> 通过此配置项添加的工具类,同样可以直接用可变修饰进行包装,比如 `sm:btn`。这个特性的功能与 `@apply` 指令很类似,它将把所有的工具类合并为一个样式。
98+
99+
- 在自定义屏幕定义中添加对 raw min/max 的支持
100+
101+
- 添加 `handleIgnored` 选项
102+
103+
- 添加 `resolveStaticUtilities` `resolveDynamicUtilities` 接口
104+
105+
- 为浏览器支持更改 `Processor(path) -> Processor(require(resolve(path)))`
106+
107+
## Bug 修复 {#bug-fixes}
108+
109+
- 修复丢失的占位符预检样式
110+
- 修复占位符伪元素上设置显式不透明度的问题
111+
- 修复添加 boxShadow 基础样式
112+
- 修复 ring 工具类
113+
- 修复使用数组添加 fontFamily
114+
- 修复通过 addUtilities addComponents 添加的无 class 样式消失问题
115+
- 修复缺少纵横比伪类
116+
- 修复缺少 --tw-ring-opacity
117+
- 修复图片基础样式建议遵循 Tailwind
118+
- 修复长颜色名称无效
119+
- 修复插件配置扩展无效
120+
- 修复 keyframes 不应该被可变修饰包装
121+
- 修复 container 不应该分开
122+
- 修复 keyframes 应该在 animation 之前渲染
123+
- 修复 leading 应该在 text 之后渲染
124+
- 修复深层嵌套颜色
125+
- 修复 CLI 无法在 Windows 上仅扫描子文件夹中的文件
126+
- 修复用户主题应该替换默认主题
127+
- 修复 gridTemplateColumns 的生成
128+
- 修复自定义字符串样式的 fontSize 和作为数组第二项的 lineHeight 时的问题
129+
- 修复自定义动画无效
130+
- 修复图片无效
131+
- 代码格式和工作流程改进

0 commit comments

Comments
 (0)