Skip to content

Commit b13f50b

Browse files
authored
docs(cn): features/responsive-design translation (#24)
* docs(cn): features/responsive-design translation * docs(cn): update features/responsive-design
1 parent 0a10857 commit b13f50b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

features/responsive-design.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Responsive Design
1+
# 响应式设计 {#responsive-design}
22

3-
Doing [Responsive Design](https://en.wikipedia.org/wiki/Responsive_web_design) in Windi CSS is effortless. By simply adding variant prefixes like `md:` or `lg:` to the utility you want to use. The corresponding media query will be generated automatically. Try it yourself using the playground below:
3+
在 Windi CSS 中,可以很轻松实现 [响应式设计](https://en.wikipedia.org/wiki/Responsive_web_design)。只需要将可变修饰(variant)的前缀加到对应的工具类前,比如 `md:``lg:`。对应的媒体查询会自动生成。实现方式如下:
44

55
<InlinePlayground :input="'p-1 lg:p-2'" :showCSS="true" :showPreview="false"/>
66

7-
When you want to apply a breakpoint variant to multiple utilities, in Windi CSS you can do that without repeating yourself by using the [Variant Groups](/features/variant-groups.html) feature.
7+
当你想把断点可变修饰加到多个工具类上时,在 Windi CSS 中你可以通过使用 [可变修饰组](/features/variant-groups.html) 特性来实现,而不需要重复编写。
88

99
<InlinePlayground :input="'p-1 lg:(p-2 m-2 text-red-400)'" :showCSS="true" :showPreview="false"/>
1010

11-
## Custom Range
11+
## 自定义范围 {#custom-range}
1212

13-
By default, Windi CSS's breakpoints is designed as Mobile First.
13+
默认情况下,Windi CSS 的断点被设计为移动端优先。
1414

15-
This means unprefixed utilities (like `p-1`) take effect on all screen sizes, while prefixed utilities (like `md:p-2`) only take effect at the **specified breakpoint and above**.
15+
这就意味着没有前缀的工具类(比如:`p-1`) 作用在所有尺寸的屏幕上,而带有前缀的工具类(比如:`md:p-2`)只在**指定断点及以上尺寸**起作用。
1616

17-
We also provided the ability to have more controls over the query range by adding the `<` and `@` prefix:
17+
我们还添加通过 `<` `@` 前缀的方式,提供了超过查询范围的情况下的更多控制能力。
1818

1919
```bash
2020
lg => greater or equal than this breakpoint
@@ -24,19 +24,19 @@ lg => greater or equal than this breakpoint
2424

2525
<InlinePlayground :input="'lg:p-1\n<lg:p-2\n@lg:p-3'" :showCSS="true" :showPreview="false"/>
2626

27-
## Breakpoints
27+
## 断点 {#breakpoints}
2828

29-
| | Default | `<` prefixed | `@` prefixed |
29+
| | 默认 | 带有 `<` 前缀 | 带有 `@` 前缀 |
3030
| :------ | :--- | :--- | :--- |
3131
| sm | (min-width: 640px) | (max-width: 639.9px) | (min-width: 640px) and <br>(max-width: 767.9px) |
3232
| md | (min-width: 768px) | (max-width: 767.9px) | (min-width: 768px) and <br>(max-width: 1023.9px) |
3333
| lg | (min-width: 1024px) | (max-width: 1023.9px) | (min-width: 1024px) and <br>(max-width: 1279.9px) |
3434
| xl | (min-width: 1280px) | (max-width: 1279.9px) | (min-width: 1280px) and <br>(max-width: 1535.9px) |
3535
| 2xl | (min-width: 1536px) | (max-width: 1535.9px) | (min-width: 1536px) |
3636

37-
## Customization
37+
## 自定义 {#customization}
3838

39-
You can customize your breakpoints in your `windi.config.js`
39+
你可以在你的 `windi.config.js` 中自定义断点。
4040

4141
```ts
4242
// windi.config.js

0 commit comments

Comments
 (0)