Skip to content

Commit

Permalink
docs: optimize translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Skyblue committed Jul 13, 2024
1 parent 1b600b6 commit 08e79d3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/guide/extracting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ outline: deep

# 提取

UnoCSS 通过搜索您的代码库中的实用工具用法并根据需要生成相应的 CSS 来工作。我们称这个过程为**提取**
UnoCSS 通过搜索您的代码库中的工具类用法并根据需要生成相应的 CSS 来工作。我们称这个过程为**提取**

## 内容来源

Expand Down
10 changes: 5 additions & 5 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: UnoCSS 入门

## 什么是 UnoCSS?

UnoCSS 是即时原子 CSS 引擎,旨在灵活和可扩展。核心是不带偏见的,所有的 CSS 实用工具都是通过预设提供的
UnoCSS 是即时原子 CSS 引擎,旨在灵活和可扩展。核心是不带偏见的,所有的 CSS 工具类都是通过预设提供的

例如,您可以通过在本地 [配置文件](/guide/config-file) 中提供规则来定义自定义 CSS 实用工具
例如,您可以通过在本地 [配置文件](/guide/config-file) 中提供规则来定义自定义 CSS 工具类

```ts
// uno.config.ts
Expand All @@ -20,7 +20,7 @@ export default defineConfig({
})
```

这将在您的项目中添加一个新的 CSS 实用工具 `m-1`。由于 UnoCSS 是按需的,在您的代码库中使用它之前它不会起作用。所以假设我们有这样一个组件:
这将在您的项目中添加一个新的 CSS 工具类 `m-1`。由于 UnoCSS 是按需的,在您的代码库中使用它之前它不会起作用。所以假设我们有这样一个组件:

```html
<div class="m-1">Hello</div>
Expand All @@ -44,7 +44,7 @@ export default defineConfig({
})
```

通过这样做,现在您可以拥有任意的边距实用工具,例如 `m-1``m-100``m-52.43`。再次强调,UnoCSS 只有在您使用它们时才会生成它们。
通过这样做,现在您可以拥有任意的边距工具类,例如 `m-1``m-100``m-52.43`。再次强调,UnoCSS 只有在您使用它们时才会生成它们。

```html
<div class="m-1">Hello</div>
Expand Down Expand Up @@ -92,7 +92,7 @@ export default defineConfig({

## 尝试

您可以在浏览器中尝试 UnoCSS,打开 <a href="/play/" target="_blank">Playground</a>。或在 <a href="/interactive/" target="_blank">交互文档</a> 中查找默认预设的实用工具
您可以在浏览器中尝试 UnoCSS,打开 <a href="/play/" target="_blank">Playground</a>。或在 <a href="/interactive/" target="_blank">交互文档</a> 中查找默认预设的工具类

## 集成

Expand Down
6 changes: 3 additions & 3 deletions docs/guide/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ UnoCSS 是一个包含多个包的单体存储库。本页列出了所有的包
| [@unocss/preset-icons](/presets/icons) | 由 Iconify 提供支持的纯 CSS 图标解决方案 |||
| [@unocss/preset-web-fonts](/presets/web-fonts) | Web 字体(Google 字体等)支持 |||
| [@unocss/preset-typography](/presets/typography) | 排版预设 |||
| [@unocss/preset-rem-to-px](/presets/rem-to-px) | 将 rem 转换为 px 的实用工具 |||
| [@unocss/preset-legacy-compat](/presets/legacy-compat) | 旧版本兼容性实用工具的集合 |||
| [@unocss/preset-rem-to-px](/presets/rem-to-px) | 将 rem 转换为 px 的工具类 |||
| [@unocss/preset-legacy-compat](/presets/legacy-compat) | 旧版本兼容性工具类的集合 |||
| [@unocss/transformer-variant-group](/transformers/variant-group) | 用于 Windi CSS 的变体组功能的转换器 |||
| [@unocss/transformer-directives](/transformers/directives) | 用于 CSS 指令(如 `@apply`)的转换器 |||
| [@unocss/transformer-compile-class](/transformers/compile-class) | 将一组类编译成一个类的转换器 |||
| [@unocss/transformer-attributify-jsx](/transformers/attributify-jsx) | 支持 JSX/TSX 中无值 attributify |||
| [@unocss/extractor-pug](/extractors/pug) | Pug 的提取器 || - |
| [@unocss/extractor-svelte](/extractors/svelte) | Svelte 的提取器 || - |
| [@unocss/autocomplete](/tools/autocomplete) | 自动完成的实用工具 || - |
| [@unocss/autocomplete](/tools/autocomplete) | 自动完成的工具类 || - |
| [@unocss/config](/guide/config-file) | 配置文件加载器 || - |
| [@unocss/reset](/guide/style-reset) | 常见 CSS 重置的集合 |||
| [@unocss/vite](/integrations/vite) | Vite 插件 || - |
Expand Down
4 changes: 2 additions & 2 deletions docs/presets/legacy-compat.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Legacy Compat 预设
description: 旧版兼容实用工具的集合
description: 旧版兼容工具类的集合
outline: deep
---

# Legacy Compat 预设

旧版兼容实用工具的集合
旧版兼容工具类的集合

该预设不包含任何规则,而是对其他预设生成的 CSS 应用后处理。

Expand Down
6 changes: 3 additions & 3 deletions docs/presets/mini.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ outline: deep

# Mini 预设

UnoCSS 的基本预设,仅包含最基本的实用工具
UnoCSS 的基本预设,仅包含最基本的工具类

[源代码](https://github.com/unocss/unocss/tree/main/packages/preset-mini)

Expand Down Expand Up @@ -47,7 +47,7 @@ import { presetMini } from 'unocss'

## 规则

该预设是 [`@unocss/preset-wind`](/presets/wind) 的子集,仅包含与 CSS 属性对齐的最基本的实用工具,但不包括 Tailwind CSS 中引入的主观或复杂的实用工具`container``animation``gradient` 等)。这可以作为您自己的定制预设的起点,基于 Tailwind CSS 或 Windi CSS 中熟悉的实用工具
该预设是 [`@unocss/preset-wind`](/presets/wind) 的子集,仅包含与 CSS 属性对齐的最基本的工具类,但不包括 Tailwind CSS 中引入的主观或复杂的工具类`container``animation``gradient` 等)。这可以作为您自己的定制预设的起点,基于 Tailwind CSS 或 Windi CSS 中熟悉的工具类

## 特性

Expand Down Expand Up @@ -177,7 +177,7 @@ CSS 自定义属性的前缀。
- **类型:** `string | string[]`
- **默认值:** `undefined`

实用工具前缀
工具类前缀

### preflight
- **类型:** `boolean`
Expand Down
4 changes: 2 additions & 2 deletions docs/presets/rem-to-px.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Rem to px 预设
description: 为所有实用工具将 rem 转换为 px (@unocss/preset-rem-to-px)。
description: 为所有工具类将 rem 转换为 px (@unocss/preset-rem-to-px)。
outline: deep
---

# Rem to px 预设

将所有实用工具中的 rem 转换为 px。
将所有工具类中的 rem 转换为 px。

[源代码](https://github.com/unocss/unocss/tree/main/packages/preset-rem-to-px)

Expand Down
2 changes: 1 addition & 1 deletion docs/presets/wind.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { presetWind } from 'unocss'

### 引号

在模板(用于处理的文件)中使用引号是不被支持的,因为这会影响提取器的工作。例如,你不能写 `before:content-['']`。对于这些情况,你可能更倾向于引入一个新的实用工具类,比如 `class="before:content-empty"`,以便明确设置。
在模板(用于处理的文件)中使用引号是不被支持的,因为这会影响提取器的工作。例如,你不能写 `before:content-['']`。对于这些情况,你可能更倾向于引入一个新的工具类类,比如 `class="before:content-empty"`,以便明确设置。

## 与 Windi CSS 的差异

Expand Down

0 comments on commit 08e79d3

Please sign in to comment.