Skip to content

Commit

Permalink
Merge branch 'main' into vscode-match-stuck
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Apr 20, 2024
2 parents 1ac0cad + 8938d42 commit 2327aac
Show file tree
Hide file tree
Showing 80 changed files with 12,208 additions and 9,706 deletions.
4 changes: 2 additions & 2 deletions bench/package.json
@@ -1,5 +1,5 @@
{
"version": "0.59.3",
"version": "0.59.4",
"scripts": {
"bench": "node run.mjs"
},
Expand All @@ -12,7 +12,7 @@
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"unocss": "workspace:*",
"vite": "^5.2.8",
"vite": "^5.2.9",
"vite-plugin-windicss": "^1.9.3",
"vue": "^3.4.21",
"windicss": "^3.5.6"
Expand Down
14 changes: 7 additions & 7 deletions docs/config/rules.md
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
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
@@ -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
4 changes: 2 additions & 2 deletions docs/package.json
@@ -1,7 +1,7 @@
{
"name": "docs",
"type": "module",
"version": "0.59.3",
"version": "0.59.4",
"private": true,
"scripts": {
"docs:dev": "vitepress dev",
Expand All @@ -17,6 +17,6 @@
"@iconify-json/vscode-icons": "^1.1.33",
"ofetch": "^1.3.4",
"unocss": "workspace:*",
"vitepress": "^1.1.0"
"vitepress": "^1.1.1"
}
}
4 changes: 2 additions & 2 deletions examples/astro-vue/package.json
Expand Up @@ -12,10 +12,10 @@
"vue": "^3.4.21"
},
"devDependencies": {
"@astrojs/vue": "^4.0.11",
"@astrojs/vue": "^4.1.0",
"@iconify-json/logos": "^1.1.42",
"@unocss/reset": "link:../../packages/reset",
"astro": "^4.5.18",
"astro": "^4.6.2",
"unocss": "link:../../packages/unocss"
},
"stackblitz": {
Expand Down
2 changes: 1 addition & 1 deletion examples/astro/package.json
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@iconify-json/logos": "^1.1.42",
"@unocss/reset": "link:../../packages/reset",
"astro": "^4.5.18",
"astro": "^4.6.2",
"canvas-confetti": "^1.9.2",
"unocss": "link:../../packages/unocss"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/next/package.json
Expand Up @@ -13,7 +13,7 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@iconify-json/lucide": "^1.1.180",
"@iconify-json/lucide": "^1.1.183",
"@types/node": "20.8.3",
"@types/react": "18.2.25",
"@types/react-dom": "18.2.11",
Expand Down
2 changes: 1 addition & 1 deletion examples/quasar/package.json
Expand Up @@ -15,7 +15,7 @@
"@quasar/extras": "^1.16.11",
"quasar": "^2.6.0",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
"vue-router": "^4.3.2"
},
"devDependencies": {
"@quasar/app-vite": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/qwik/package.json
Expand Up @@ -19,7 +19,7 @@
"@unocss/reset": "link:../../packages/reset",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
4 changes: 2 additions & 2 deletions examples/remix/package.json
Expand Up @@ -24,8 +24,8 @@
},
"devDependencies": {
"@remix-run/dev": "^2.8.1",
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@unocss/cli": "link:../../packages/cli",
"@unocss/preset-attributify": "link:../../packages/preset-attributify",
"@unocss/preset-uno": "link:../../packages/preset-uno",
Expand Down
6 changes: 3 additions & 3 deletions examples/sveltekit-preprocess/package.json
Expand Up @@ -26,19 +26,19 @@
"devDependencies": {
"@iconify-json/logos": "^1.1.42",
"@sveltejs/adapter-auto": "^3.2.0",
"@sveltejs/kit": "^2.5.5",
"@sveltejs/kit": "^2.5.6",
"@sveltejs/package": "^2.3.1",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@unocss/core": "link:../../packages/core",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"@unocss/svelte-scoped": "link:../../packages/svelte-scoped",
"publint": "^0.2.7",
"svelte": "^4.2.13",
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
6 changes: 3 additions & 3 deletions examples/sveltekit-scoped/package.json
Expand Up @@ -13,17 +13,17 @@
"@iconify-json/ri": "^1.1.20",
"@julr/unocss-preset-forms": "^0.1.0",
"@sveltejs/adapter-auto": "^3.2.0",
"@sveltejs/kit": "^2.5.5",
"@sveltejs/kit": "^2.5.6",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@unocss/core": "link:../../packages/core",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"@unocss/svelte-scoped": "link:../../packages/svelte-scoped",
"svelte": "^4.2.13",
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
8 changes: 4 additions & 4 deletions examples/sveltekit/package.json
Expand Up @@ -10,20 +10,20 @@
},
"devDependencies": {
"@iconify-json/logos": "^1.1.42",
"@iconify/utils": "^2.1.22",
"@iconify/utils": "^2.1.23",
"@sveltejs/adapter-auto": "^3.2.0",
"@sveltejs/kit": "^2.5.5",
"@sveltejs/kit": "^2.5.6",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@unocss/core": "link:../../packages/core",
"@unocss/extractor-svelte": "link:../../packages/extractor-svelte",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"@unocss/preset-uno": "link:../../packages/preset-uno",
"svelte": "^4.2.13",
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
4 changes: 2 additions & 2 deletions examples/vite-elm/package.json
Expand Up @@ -16,8 +16,8 @@
"@unocss/preset-uno": "link:../../packages/preset-uno",
"elm-tooling": "^1.15.1",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8",
"vite-plugin-elm": "^3.0.0"
"vite": "^5.2.9",
"vite-plugin-elm": "^3.0.1"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-lightningcss/package.json
Expand Up @@ -17,7 +17,7 @@
"lightningcss": "^1.24.1",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-lit/package.json
Expand Up @@ -25,7 +25,7 @@
"@unocss/preset-typography": "link:../../packages/preset-typography",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8",
"vite": "^5.2.9",
"vite-plugin-inspect": "^0.8.3"
},
"stackblitz": {
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-preact/package.json
Expand Up @@ -21,7 +21,7 @@
"cross-env": "^7.0.3",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-pug/package.json
Expand Up @@ -14,7 +14,7 @@
"@vitejs/plugin-vue": "^5.0.4",
"pug": "^3.0.2",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
6 changes: 3 additions & 3 deletions examples/vite-react/package.json
Expand Up @@ -15,16 +15,16 @@
},
"devDependencies": {
"@iconify-json/logos": "^1.1.42",
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@unocss/core": "link:../../packages/core",
"@unocss/preset-attributify": "link:../../packages/preset-attributify",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"@vitejs/plugin-react": "^4.2.1",
"cross-env": "^7.0.3",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-solid/package.json
Expand Up @@ -17,7 +17,7 @@
"@unocss/preset-icons": "link:../../packages/preset-icons",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8",
"vite": "^5.2.9",
"vite-plugin-solid": "^2.10.2"
},
"stackblitz": {
Expand Down
4 changes: 2 additions & 2 deletions examples/vite-svelte-postcss/package.json
Expand Up @@ -14,12 +14,12 @@
"@tsconfig/svelte": "^5.0.4",
"@unocss/extractor-svelte": "link:../../packages/extractor-svelte",
"@unocss/postcss": "link:../../packages/postcss",
"svelte": "^4.2.13",
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
6 changes: 3 additions & 3 deletions examples/vite-svelte/package.json
Expand Up @@ -15,13 +15,13 @@
"@unocss/core": "link:../../packages/core",
"@unocss/extractor-svelte": "link:../../packages/extractor-svelte",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"svelte": "^4.2.13",
"svelte": "^4.2.15",
"svelte-check": "^3.6.9",
"svelte-preprocess": "^5.1.3",
"svelte-preprocess": "^5.1.4",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-vue3-postcss/package.json
Expand Up @@ -16,7 +16,7 @@
"@vitejs/plugin-vue": "^5.0.4",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-vue3/package.json
Expand Up @@ -18,7 +18,7 @@
"@vitejs/plugin-vue": "^5.0.4",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
6 changes: 3 additions & 3 deletions examples/vite-watch-mode/package.json
Expand Up @@ -12,16 +12,16 @@
},
"devDependencies": {
"@iconify-json/logos": "^1.1.42",
"@types/react": "^18.2.75",
"@types/react-dom": "^18.2.24",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@unocss/core": "link:../../packages/core",
"@unocss/preset-attributify": "link:../../packages/preset-attributify",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"@vitejs/plugin-react": "^4.2.1",
"cross-env": "^7.0.3",
"typescript": "^5.4.5",
"unocss": "link:../../packages/unocss",
"vite": "^5.2.8"
"vite": "^5.2.9"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/vue-cli4/package.json
@@ -1,5 +1,5 @@
{
"version": "0.59.3",
"version": "0.59.4",
"private": true,
"scripts": {
"dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
Expand Down
4 changes: 2 additions & 2 deletions examples/vue-cli5/package.json
@@ -1,13 +1,13 @@
{
"version": "0.59.3",
"version": "0.59.4",
"private": true,
"scripts": {
"dev": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.36.1",
"core-js": "^3.37.0",
"vue": "^2.7.16"
},
"devDependencies": {
Expand Down

0 comments on commit 2327aac

Please sign in to comment.