forked from AsakuraMizu/unocss-preset-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
text.ts
27 lines (21 loc) · 798 Bytes
/
text.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import type { DynamicShortcut, StaticShortcut } from '@unocss/core';
const text: (StaticShortcut | DynamicShortcut)[] = [
// Font Family
['font-heading-token', 'font-heading'],
['font-token', 'font-base'],
// Default Text Colors
['text-base-token', 'text-theme-base'],
['text-dark-token', 'text-theme-dark'],
// Light/Dark Text Color - ex: .text-token
['text-token', 'text-base-token dark:text-dark-token'],
// On-X Text Colors
// Example: .text-on-primary-token
[/^text-on-(.+)-token$/, ([, color]) => `text-on-${color}`],
// Color Pairings
// Example: .text-primary-50-900-token | .text-primary-900-50-token
[
/^text-(.+)-(\d+)-(\d+)-token$/,
([, color, light, dark]) => `text-${color}-${light} dark:text-${color}-${dark}`,
],
];
export default text;