Skip to content

Commit e4f7f47

Browse files
committed
Update text color variables and add design variables
1 parent 9a62fa8 commit e4f7f47

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

website/app/[locale]/(root)/docs/text-colors/content.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,15 @@ Apply the defined `text-*` variables using the inherited rules <TextHeirs />.
7979
-<p class="text:pink">text-fill-color properity</p>
8080
+<p class="fg:pink">color properity</p>
8181
```
82-
(i) You can use `$(blue)` to apply `variables.blue` instead of `variables.text.blue`:
82+
83+
### Apply text color to any syntax
84+
Besides inheriting the above rules, you can use `text-*` to access global text color variables in other syntax.
85+
```html
86+
<svg class="stroke:**text-light**"></svg>
87+
```
88+
89+
### Escape inherited text colors
90+
Use `$(blue)` to apply `variables.blue` instead of `variables.text.blue`.
8391
```html
8492
<p class="fg:**$(blue)**">…</p>
8593
```
@@ -98,7 +106,7 @@ export default {
98106
}
99107
}
100108
```
101-
Apply it:
109+
Apply the custom color:
102110
```html
103111
<p class="fg:**primary**"></p>
104112
```

website/app/api/og-image/route.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ export async function GET(req: NextRequest, props: any) {
3232
metadata,
3333
title,
3434
description,
35-
props
35+
props: {
36+
...props,
37+
params: {
38+
locale
39+
}
40+
}
3641
})
3742
}

website/i18n/tw.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"Comparison": "比較",
1313
"Production Optimization": "效能優化",
1414
"Variables & Modes": "變數與模式",
15+
"Design Variables": "設計變數",
1516
"Colors": "色彩",
1617
"Fonts": "字體",
1718
"Screen Sizes": "螢幕尺寸",

website/og-image.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export default async function create({
7777
Lola: readImage(lolaFilename),
7878
Monting: readImage(montingFilename),
7979
}
80-
8180
const $ = await createTranslation(props.params?.locale)
8281
title = $(title || metadata?.openGraph?.title).replace(' - Master CSS', '') as string
8382
description = $(description || metadata?.openGraph?.description || metadata?.description) as string

0 commit comments

Comments
 (0)