Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions features/rtl.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# RTL
# 从右到左 {#rtl}

Windi CSS has out-of-box RTL support with zero configuration from `v2.5.4`.
`v2.5.4` 起可用,Windi CSS 拥有开箱即用的从右到左(RTL)书写方式支持,且无需任何配置。

By prefixing the `rtl:` variant to the utilities, they will only apply when RTL is enabled.
通过向工具类前方增加 `rtl:` 可变修饰即可,仅在 RTL 启用时生效。

<!-- With the following example, the `Preview` text will be `text-right` and `text-red-400` on the RTL. Try play with it: -->

<!-- <InlinePlayground :input="'text-green-400 rtl:(text-right text-red-400)'" :showCSS="true" :showPreview="true" /> -->

It's easy to enable RTL, you just need to apply `dir="rtl"` on the `html` element to make it affects.
开启 RTL 很简单,只需要在 `html` 标签上增加 `dir="rtl"` 属性就可使其生效。

```html
<html>
<body>
<!-- RTL disabled -->
<!-- RTL 禁用 -->
</body>
</html>

<html dir="rtl">
<body>
<!-- RTL enabled -->
<!-- RTL 启用 -->
</body>
</html>
```