Skip to content

Commit

Permalink
docs: improve wording (#3707)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <github@antfu.me>
  • Loading branch information
bn-l and antfu committed Apr 18, 2024
1 parent e19fd6f commit 7c8641a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
14 changes: 7 additions & 7 deletions docs/config/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ the corresponding CSS will be generated:
.p-5 { padding: 1.25rem; }
```

Congratulations! Now you got your own powerful atomic CSS utilities. Enjoy!
Congratulations! Now you've got your own powerful atomic CSS utilities. Enjoy!

## Full controlled rules
## Fully controlled rules

::: warning
This is an advanced feature, you don't need it in most of the cases.
::: tip
This is an advanced feature, in most situtations it won't be needed.
:::

When you really need some advanced rules that can't be covered by the combination of [Dynamic Rules](#dynamic-rules) and [Variants](/config/variants), UnoCSS also provide a way to give you full control to generate the CSS.
When you really need some advanced rules that aren't covered by the combination of [Dynamic Rules](#dynamic-rules) and [Variants](/config/variants), UnoCSS also provides a way to give you full control to generate the CSS.

By returning a `string` from the dynamic rule's body function, it will be directly passed to the generated CSS. That also means you would need to take care of things like CSS escaping, variants applying, CSS constructing, and so on.
It allows you to return a string from the dynamic rule's body function which will be **directly** passed to the generated CSS (this also means you need to take care of things like CSS escaping, variant applying, CSS constructing, and so on).

```ts
// uno.config.ts
Expand Down Expand Up @@ -118,7 +118,7 @@ ${selector}::after {

UnoCSS respects the order of the rules you defined in the generated CSS. Latter ones come with higher priority.

When using dynamic rule, it would likely match multiple tokens. By default, output of those matched under a single dynamic rule will be sorted alphabetically within the group.
When using dynamic rules, it may match multiple tokens. By default, the output of those matched under a single dynamic rule will be sorted alphabetically within the group.

## Rules merging

Expand Down
2 changes: 1 addition & 1 deletion docs/config/theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ shortcuts: [
## Breakpoints

::: warning
One exception is that UnoCSS gives full control of `breakpoints` to users. When a custom `breakpoints` is provided, the default will be overridden instead of merging.
When a custom `breakpoints` object is provided the default will be overridden instead of merging.
:::

With the following example, you will be able to only use the `sm:` and `md:` breakpoint variants:
Expand Down
4 changes: 1 addition & 3 deletions docs/config/transformers.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Transformers

Transformers are used to transform the source code to support conventions.

It provide a unified interface to transform source code in order to support conventions.
Provides a unified interface to transform source code in order to support conventions.

```ts
// my-transformer.ts
Expand Down

0 comments on commit 7c8641a

Please sign in to comment.