@rescui/typography 0.27.1 → 0.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/lib/index-moduled.css +120 -120
- package/lib/index-moduled.p.module.css.js +128 -128
- package/llm/index.md +11 -0
- package/llm/typography/advanced-css-api.md +753 -0
- package/llm/typography/code.md +97 -0
- package/llm/typography/color-cn.md +68 -0
- package/llm/typography/digits.md +92 -0
- package/llm/typography/headings.md +105 -0
- package/llm/typography/links.md +150 -0
- package/llm/typography/lists.md +145 -0
- package/llm/typography/subtitles.md +85 -0
- package/llm/typography/text-cn.md +308 -0
- package/llm/typography/texts.md +92 -0
- package/llm/typography.md +150 -0
- package/package.json +4 -3
|
@@ -0,0 +1,753 @@
|
|
|
1
|
+
# Advanced CSS API
|
|
2
|
+
|
|
3
|
+
CSS Mixins for advanced components development.
|
|
4
|
+
|
|
5
|
+
To chose a mixins, check out the [overview](/typography/advanced-css-api/#before-using).
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
### Before using
|
|
10
|
+
|
|
11
|
+
This section is intended for library development.
|
|
12
|
+
|
|
13
|
+
In most cases, [textCn js-helper](/typography/text-cn/) and [its mixins](/typography/text-cn/css/) should be enough.
|
|
14
|
+
|
|
15
|
+
If you need to create your own typography selectors, use [Full mixins](/typography/advanced-css-api/full/).
|
|
16
|
+
|
|
17
|
+
[Low-level mixins](/typography/advanced-css-api/low-level/) should only be used for component development if you need to omit typography selectors from your bundle. For example, we do that in our library components.
|
|
18
|
+
|
|
19
|
+
[Modifiers](/typography/advanced-css-api/modifiers/) mixins should only be used with [Full](/typography/advanced-css-api/full/) or [Low-level](/typography/advanced-css-api/low-level/) mixins.
|
|
20
|
+
|
|
21
|
+
[Adaptivity](/typography/advanced-css-api/adaptivity/) mixins are useful when you need to configure adaptivity transformations for custom breakpoints.
|
|
22
|
+
|
|
23
|
+
[Color](/typography/advanced-css-api/color/) mixins may be used with any elements to change its color without changing anything else.
|
|
24
|
+
|
|
25
|
+
## Full
|
|
26
|
+
|
|
27
|
+
### Full mixins
|
|
28
|
+
|
|
29
|
+
`Full` mixins include all styles and variables required for rendering typography elements. Because of that, it may not be optimal to use them when you are developing a single component that includes multiple text elements.
|
|
30
|
+
|
|
31
|
+
If you need a more optimized way to utilize typography mixins, check out [low-level mixins](/typography/advanced-css-api/low-level/).
|
|
32
|
+
|
|
33
|
+
| Mixin name | Details |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `rs-typography-digits-1-full` | value: `"rs-digits-1"` |
|
|
36
|
+
| `rs-typography-digits-2-full` | value: `"rs-digits-2"` |
|
|
37
|
+
| `rs-typography-super-hero-full` | value: `"rs-super-hero"` |
|
|
38
|
+
| `rs-typography-middle-hero-full` | value: `"rs-middle-hero"` |
|
|
39
|
+
| `rs-typography-hero-full` | value: `"rs-hero"` |
|
|
40
|
+
| `rs-typography-h1-full` | value: `"rs-h1"` |
|
|
41
|
+
| `rs-typography-h2-full` | value: `"rs-h2"` |
|
|
42
|
+
| `rs-typography-h3-plus-full` | value: `"rs-h3-plus"` |
|
|
43
|
+
| `rs-typography-h3-full` | value: `"rs-h3"` |
|
|
44
|
+
| `rs-typography-h4-full` | value: `"rs-h4"` |
|
|
45
|
+
| `rs-typography-h5-full` | value: `"rs-h5"` |
|
|
46
|
+
| `rs-typography-subtitle-1-full` | value: `"rs-subtitle-1"` |
|
|
47
|
+
| `rs-typography-subtitle-2-full` | value: `"rs-subtitle-2"` |
|
|
48
|
+
| `rs-typography-overline-full` | value: `"rs-overline"` |
|
|
49
|
+
| `rs-typography-text-1-full` | value: `"rs-text-1"` |
|
|
50
|
+
| `rs-typography-text-2-full` | value: `"rs-text-2"` |
|
|
51
|
+
| `rs-typography-text-3-full` | value: `"rs-text-3"` |
|
|
52
|
+
| `rs-typography-ul-full` | value: `"rs-ul"` |
|
|
53
|
+
| `rs-typography-ol-full` | value: `"rs-ol"` |
|
|
54
|
+
| `rs-typography-code-full` | value: `"rs-code"` |
|
|
55
|
+
| `rs-typography-pre-full` | value: `"rs-pre"` |
|
|
56
|
+
| `rs-typography-link-full` | value: `"rs-link"` |
|
|
57
|
+
|
|
58
|
+
#### Demo
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
const MyTypography = () => {
|
|
62
|
+
return (
|
|
63
|
+
<div style={{ maxWidth: 800 }}>
|
|
64
|
+
<h1 className={'my-hero'}>The drive to develop</h1>
|
|
65
|
+
<p className={'my-subtitle-2 rs-docs-offset-top-24'}>
|
|
66
|
+
We make professional software development a more productive and
|
|
67
|
+
enjoyable experience.
|
|
68
|
+
</p>
|
|
69
|
+
<h3 className={'my-h3 rs-docs-offset-top-48'}>The drive to develop</h3>
|
|
70
|
+
<p className={'my-text-2 rs-docs-offset-top-24'}>
|
|
71
|
+
We make professional software development a more productive and
|
|
72
|
+
enjoyable experience.
|
|
73
|
+
</p>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
render(<MyTypography />);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```postcss
|
|
82
|
+
@import '@rescui/typography/lib/public-api.p.css';
|
|
83
|
+
|
|
84
|
+
.my-hero {
|
|
85
|
+
@mixin rs-typography-hero-full;
|
|
86
|
+
}
|
|
87
|
+
.my-subtitle-2 {
|
|
88
|
+
@mixin rs-typography-subtitle-2-full;
|
|
89
|
+
}
|
|
90
|
+
.my-h3 {
|
|
91
|
+
@mixin rs-typography-h3-full;
|
|
92
|
+
}
|
|
93
|
+
.my-text-2 {
|
|
94
|
+
@mixin rs-typography-text-2-full;
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Low Level API
|
|
99
|
+
|
|
100
|
+
### Intro
|
|
101
|
+
|
|
102
|
+
If you don't need to omit typography classes from your bundle, like we do in our library components, use [textCn](/typography/texts-cn/) helper and its [mixins](/typography/text-cn/css/).
|
|
103
|
+
|
|
104
|
+
If you need to create your own typography selectors, use [Full mixins](/typography/advanced-css-api/full/).
|
|
105
|
+
|
|
106
|
+
Use low-level mixins for optimized component development when you need to inline typography styles in your component classes.
|
|
107
|
+
|
|
108
|
+
Mixins described further must be used alongside other required mixins on the same element or above. This is specified in the descriptions.
|
|
109
|
+
|
|
110
|
+
#### Properties mixins
|
|
111
|
+
|
|
112
|
+
These mixins set final CSS properties on the selector.
|
|
113
|
+
|
|
114
|
+
In most cases, these properties use specific private CSS variables which can be applied using [CSS vars mixins](#text-base-css-vars-mixins).
|
|
115
|
+
|
|
116
|
+
| Mixin name | Details |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| `rs-typography-text-base-styles-without-color` | value: `text base`<br><br>Apply text base CSS properties, excluding `color`. Requires [text base mixin](#text-base-css-vars-mixins), [theme mixin](/design/colors/css/) and `rs-typography-color-base` mixin. |
|
|
119
|
+
| `rs-typography-list-styles` | value: `list`<br><br>Apply list CSS properties. Requires [list mixin](#list-css-vars-mixins). |
|
|
120
|
+
| `rs-typography-code-styles` | value: `code`<br><br>Apply code CSS properties. Requires [theme mixin](/design/colors/css/). |
|
|
121
|
+
| `rs-typography-pre-styles` | value: `pre`<br><br>Apply pre CSS properties. Requires [theme mixin](/design/colors/css/). |
|
|
122
|
+
| `rs-typography-link-styles` | value: `link`<br><br>Apply link CSS properties. Requires [theme and primary-color mixins](/design/colors/css/). |
|
|
123
|
+
|
|
124
|
+
#### Text base CSS vars mixins
|
|
125
|
+
|
|
126
|
+
These mixins should only be used with `rs-typography-text-base-styles-without-color` mixin and its dependencies.
|
|
127
|
+
|
|
128
|
+
| Mixin name | Details |
|
|
129
|
+
| --- | --- |
|
|
130
|
+
| `rs-typography-digits-1` | value: `rs-digits-1`<br><br>Apply digits-1 css variables |
|
|
131
|
+
| `rs-typography-digits-2` | value: `rs-digits-2`<br><br>Apply digits-2 css variables |
|
|
132
|
+
| `rs-typography-super-hero` | value: `rs-super-hero`<br><br>Apply super-hero css variables |
|
|
133
|
+
| `rs-typography-middle-hero` | value: `rs-middle-hero`<br><br>Apply middle-hero css variables |
|
|
134
|
+
| `rs-typography-hero` | value: `rs-hero`<br><br>Apply hero css variables |
|
|
135
|
+
| `rs-typography-subtitle-1` | value: `rs-subtitle-1`<br><br>Apply subtitle-1 css variables |
|
|
136
|
+
| `rs-typography-subtitle-2` | value: `rs-subtitle-2`<br><br>Apply subtitle-2 css variables |
|
|
137
|
+
| `rs-typography-h1` | value: `rs-h1`<br><br>Apply h1 css variables |
|
|
138
|
+
| `rs-typography-h2` | value: `rs-h2`<br><br>Apply h2 css variables |
|
|
139
|
+
| `rs-typography-h3-plus` | value: `rs-h3-plus`<br><br>Apply h3-plus css variables |
|
|
140
|
+
| `rs-typography-h3` | value: `rs-h3`<br><br>Apply h3 css variables |
|
|
141
|
+
| `rs-typography-h4` | value: `rs-h4`<br><br>Apply h4 css variables |
|
|
142
|
+
| `rs-typography-h5` | value: `rs-h5`<br><br>Apply h5 css variables |
|
|
143
|
+
| `rs-typography-text-1` | value: `rs-text-1`<br><br>Apply text-1 css variables |
|
|
144
|
+
| `rs-typography-text-2` | value: `rs-text-2`<br><br>Apply text-2 css variables |
|
|
145
|
+
| `rs-typography-text-3` | value: `rs-text-3`<br><br>Apply text-3 css variables |
|
|
146
|
+
| `rs-typography-overline` | value: `rs-overline`<br><br>Apply overline css variables |
|
|
147
|
+
|
|
148
|
+
#### List CSS vars mixins
|
|
149
|
+
|
|
150
|
+
These mixins should only be used with `rs-typography-list-styles` mixin.
|
|
151
|
+
|
|
152
|
+
| Mixin name | Details |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| `rs-typography-ul` | value: `rs-ul`<br><br>Apply ul CSS variables |
|
|
155
|
+
| `rs-typography-ol` | value: `rs-ol`<br><br>Apply ol CSS variables |
|
|
156
|
+
|
|
157
|
+
##### Demo
|
|
158
|
+
|
|
159
|
+
In this demo, theme and primary-colors API are declared only once at the root of the element, reducing final CSS size.
|
|
160
|
+
|
|
161
|
+
For different `size` variations, we only change values of the CSS-variables. This avoids duplicating CSS properties and reduces final bundle size.
|
|
162
|
+
|
|
163
|
+
```tsx
|
|
164
|
+
import cn from 'classnames';
|
|
165
|
+
|
|
166
|
+
const MyComponent = ({ className }) => {
|
|
167
|
+
return (
|
|
168
|
+
<div
|
|
169
|
+
style={{
|
|
170
|
+
padding: 12,
|
|
171
|
+
backgroundColor: 'var(--rs-color-black-t5)',
|
|
172
|
+
maxWidth: 800
|
|
173
|
+
}}
|
|
174
|
+
className={cn(className, 'my-component')}
|
|
175
|
+
>
|
|
176
|
+
<h1 className={'my-title'}>The drive to develop</h1>
|
|
177
|
+
<p className={'my-description rs-docs-offset-top-24'}>
|
|
178
|
+
We make professional{' '}
|
|
179
|
+
<a href="javascript:void(0)" className="my-link">
|
|
180
|
+
software development
|
|
181
|
+
</a>{' '}
|
|
182
|
+
a more productive and enjoyable experience.
|
|
183
|
+
</p>
|
|
184
|
+
</div>
|
|
185
|
+
);
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
render(
|
|
189
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>
|
|
190
|
+
<div>
|
|
191
|
+
<p>Size M:</p>
|
|
192
|
+
<MyComponent className={`my-component-size-m`} />
|
|
193
|
+
</div>
|
|
194
|
+
<div>
|
|
195
|
+
<p>Size L:</p>
|
|
196
|
+
<MyComponent className={`my-component-size-l`} />
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
);
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
```postcss
|
|
203
|
+
@import '@rescui/typography/lib/public-api.p.css';
|
|
204
|
+
@import '@rescui/colors/lib/public-api.p.css';
|
|
205
|
+
|
|
206
|
+
.my-component {
|
|
207
|
+
@mixin rs-theme-env;
|
|
208
|
+
@mixin rs-primary-colors-env;
|
|
209
|
+
|
|
210
|
+
.my-title,
|
|
211
|
+
.my-description {
|
|
212
|
+
@mixin rs-typography-text-base-styles-without-color;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.my-title {
|
|
216
|
+
color: var(--rs-color-black);
|
|
217
|
+
}
|
|
218
|
+
.my-description {
|
|
219
|
+
color: var(--rs-color-black-t70);
|
|
220
|
+
}
|
|
221
|
+
.my-link {
|
|
222
|
+
@mixin rs-typography-link-styles;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.my-component-size-m {
|
|
227
|
+
.my-title {
|
|
228
|
+
@mixin rs-typography-h1;
|
|
229
|
+
}
|
|
230
|
+
.my-description {
|
|
231
|
+
@mixin rs-typography-text-1;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.my-component-size-l {
|
|
236
|
+
.my-title {
|
|
237
|
+
@mixin rs-typography-hero;
|
|
238
|
+
}
|
|
239
|
+
.my-description {
|
|
240
|
+
@mixin rs-typography-subtitle-2;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## Modifiers
|
|
246
|
+
|
|
247
|
+
### Intro
|
|
248
|
+
|
|
249
|
+
These mixins should be used alongside [Full](/typography/advanced-css-api/full/) or [Low-level](/typography/advanced-css-api/low-level/) mixins.
|
|
250
|
+
|
|
251
|
+
If you want to customize `textCn` element, check out [textCn](/typography/text-cn/css/) mixins.
|
|
252
|
+
|
|
253
|
+
#### Heading mixins
|
|
254
|
+
|
|
255
|
+
These mixins should only be used on elements with [heading](/typography/headings/) styles.
|
|
256
|
+
|
|
257
|
+
| Mixin name | Details |
|
|
258
|
+
| --- | --- |
|
|
259
|
+
| `rs-typography-heading-hardness-hard` | prop: `hardness`<br><br>value: `"hard"` |
|
|
260
|
+
| `rs-typography-heading-hardness-average` | prop: `hardness`<br><br>value: `"average"` |
|
|
261
|
+
| `rs-typography-heading-hardness-pale` | prop: `hardness`<br><br>value: `"pale"` |
|
|
262
|
+
| `rs-typography-heading-hardness-auto` | prop: `hardness`<br><br>value: `null`<br><br>Set hardness of rs-typography heading element to default |
|
|
263
|
+
|
|
264
|
+
#### Subtitle mixins
|
|
265
|
+
|
|
266
|
+
These mixins should only be used on elements with `rs-subtitle-(1|2)` styles.
|
|
267
|
+
|
|
268
|
+
| Mixin name | Details |
|
|
269
|
+
| --- | --- |
|
|
270
|
+
| `rs-typography-hardness-hard` | prop: `hardness`<br><br>value: `"hard"` |
|
|
271
|
+
| `rs-typography-hardness-average` | prop: `hardness`<br><br>value: `"average"` |
|
|
272
|
+
| `rs-typography-hardness-pale` | prop: `hardness`<br><br>value: `"pale"` |
|
|
273
|
+
| `rs-typography-hardness-auto` | prop: `hardness`<br><br>value: `null`<br><br>Set hardness of rs-typography element to default |
|
|
274
|
+
|
|
275
|
+
#### Digits mixins
|
|
276
|
+
|
|
277
|
+
These mixins should only be used on elements with `rs-digits-(1|2)` styles.
|
|
278
|
+
|
|
279
|
+
| Mixin name | Details |
|
|
280
|
+
| --- | --- |
|
|
281
|
+
| `rs-typography-hardness-hard` | prop: `hardness`<br><br>value: `"hard"` |
|
|
282
|
+
| `rs-typography-hardness-average` | prop: `hardness`<br><br>value: `"average"` |
|
|
283
|
+
| `rs-typography-hardness-pale` | prop: `hardness`<br><br>value: `"pale"` |
|
|
284
|
+
| `rs-typography-hardness-auto` | prop: `hardness`<br><br>value: `null`<br><br>Set hardness of rs-typography element to default |
|
|
285
|
+
|
|
286
|
+
#### Text mixins
|
|
287
|
+
|
|
288
|
+
These mixins should only be used on elements with `rs-text-(1|2|3)` styles.
|
|
289
|
+
|
|
290
|
+
| Mixin name | Details |
|
|
291
|
+
| --- | --- |
|
|
292
|
+
| `rs-typography-paragraph-auto-offset-styles` | prop: `paragraphOffsetAuto`<br><br>value: `true`<br><br>Apply auto offset CSS properties for children paragraphs and "pre" elements |
|
|
293
|
+
| `rs-typography-hardness-hard` | prop: `hardness`<br><br>value: `"hard"` |
|
|
294
|
+
| `rs-typography-hardness-average` | prop: `hardness`<br><br>value: `"average"` |
|
|
295
|
+
| `rs-typography-hardness-pale` | prop: `hardness`<br><br>value: `"pale"` |
|
|
296
|
+
| `rs-typography-hardness-auto` | prop: `hardness`<br><br>value: `null`<br><br>Set hardness of rs-typography element to default |
|
|
297
|
+
|
|
298
|
+
#### List mixins
|
|
299
|
+
|
|
300
|
+
##### Ul List mixins
|
|
301
|
+
|
|
302
|
+
These mixins should only be used on elements with `rs-ul` styles.
|
|
303
|
+
|
|
304
|
+
| Mixin name | Details |
|
|
305
|
+
| --- | --- |
|
|
306
|
+
| `rs-typography-list-compact-true` | prop: `compact`<br><br>value: `true` |
|
|
307
|
+
| `rs-typography-list-compact-false` | prop: `compact`<br><br>value: `false` |
|
|
308
|
+
| `rs-typography-list-offset-items-4` | prop: `offsetItems`<br><br>value: `4` |
|
|
309
|
+
| `rs-typography-list-offset-items-8` | prop: `offsetItems`<br><br>value: `8` |
|
|
310
|
+
| `rs-typography-list-offset-items-12` | prop: `offsetItems`<br><br>value: `12` |
|
|
311
|
+
| `rs-typography-list-offset-items-16` | prop: `offsetItems`<br><br>value: `16` |
|
|
312
|
+
| `rs-typography-list-offset-items-24` | prop: `offsetItems`<br><br>value: `24` |
|
|
313
|
+
| `rs-typography-list-offset-items-auto` | prop: `offsetItems`<br><br>value: `null`<br><br>Set auto offset items value for list |
|
|
314
|
+
|
|
315
|
+
##### Ol List mixins
|
|
316
|
+
|
|
317
|
+
These mixins should only be used on elements with `rs-ol` styles.
|
|
318
|
+
|
|
319
|
+
| Mixin name | Details |
|
|
320
|
+
| --- | --- |
|
|
321
|
+
| `rs-typography-ol-alpha-lower` | prop: `alpha`<br><br>value: `"lower"` |
|
|
322
|
+
| `rs-typography-ol-alpha-upper` | prop: `alpha`<br><br>value: `"upper"` |
|
|
323
|
+
| `rs-typography-ol-alpha-auto` | prop: `alpha`<br><br>value: `null`<br><br>Set counter to default for ol list |
|
|
324
|
+
| `rs-typography-list-compact-true` | prop: `compact`<br><br>value: `true` |
|
|
325
|
+
| `rs-typography-list-compact-false` | prop: `compact`<br><br>value: `false` |
|
|
326
|
+
| `rs-typography-list-offset-items-4` | prop: `offsetItems`<br><br>value: `4` |
|
|
327
|
+
| `rs-typography-list-offset-items-8` | prop: `offsetItems`<br><br>value: `8` |
|
|
328
|
+
| `rs-typography-list-offset-items-12` | prop: `offsetItems`<br><br>value: `12` |
|
|
329
|
+
| `rs-typography-list-offset-items-16` | prop: `offsetItems`<br><br>value: `16` |
|
|
330
|
+
| `rs-typography-list-offset-items-24` | prop: `offsetItems`<br><br>value: `24` |
|
|
331
|
+
| `rs-typography-list-offset-items-auto` | prop: `offsetItems`<br><br>value: `null`<br><br>Set auto offset items value for list |
|
|
332
|
+
|
|
333
|
+
#### Link mixins
|
|
334
|
+
|
|
335
|
+
These mixins should only be used on elements with `rs-link` styles.
|
|
336
|
+
|
|
337
|
+
| Mixin name | Details |
|
|
338
|
+
| --- | --- |
|
|
339
|
+
| `rs-typography-link-mode-classic` | prop: `mode`<br><br>value: `"classic"` |
|
|
340
|
+
| `rs-typography-link-mode-rock` | prop: `mode`<br><br>value: `"rock"` |
|
|
341
|
+
| `rs-typography-link-mode-standalone` | prop: `mode`<br><br>value: `"standalone"` |
|
|
342
|
+
| `rs-typography-link-mode-clear` | prop: `mode`<br><br>value: `"clear"` |
|
|
343
|
+
| `rs-typography-link-hardness-hard` | prop: `hardness`<br><br>value: `"hard"` |
|
|
344
|
+
| `rs-typography-link-hardness-average` | prop: `hardness`<br><br>value: `"average"` |
|
|
345
|
+
| `rs-typography-link-hardness-pale` | prop: `hardness`<br><br>value: `"pale"` |
|
|
346
|
+
| `rs-typography-link-hardness-auto` | prop: `hardness`<br><br>value: `null`<br><br>Set default hardness for link |
|
|
347
|
+
| `rs-typography-link-external-true` | prop: `external`<br><br>value: `true`<br><br>Make link external |
|
|
348
|
+
| `rs-typography-link-external-false` | prop: `external`<br><br>value: `false`<br><br>Make link internal |
|
|
349
|
+
| `rs-typography-link-state-hover` | prop: `css-state`<br><br>value: `":hover"` |
|
|
350
|
+
| `rs-typography-link-state-focus-visible` | prop: `css-state`<br><br>value: `":focus-visible"` |
|
|
351
|
+
|
|
352
|
+
#### Other mixins
|
|
353
|
+
|
|
354
|
+
| Mixin name | Details |
|
|
355
|
+
| --- | --- |
|
|
356
|
+
| `rs-typography-reset-letter-spacing` | Apply styles which reset letter-spacing |
|
|
357
|
+
| `rs-typography-font-smoothing` | Apply smoothing font styles |
|
|
358
|
+
| `rs-typography-theme-light` | Apply light theme |
|
|
359
|
+
| `rs-typography-theme-dark` | Apply dark theme |
|
|
360
|
+
|
|
361
|
+
#### Demo
|
|
362
|
+
|
|
363
|
+
```tsx
|
|
364
|
+
const MyTypography = () => {
|
|
365
|
+
return (
|
|
366
|
+
<div style={{ maxWidth: 800 }}>
|
|
367
|
+
<h3 className={'my-heading my-heading_hardness_average'}>
|
|
368
|
+
The drive to develop
|
|
369
|
+
</h3>
|
|
370
|
+
<div
|
|
371
|
+
className="my-text my-text_auto-offset my-text_hardness_hard"
|
|
372
|
+
style={{ marginTop: 24 }}
|
|
373
|
+
>
|
|
374
|
+
<p>
|
|
375
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus
|
|
376
|
+
esse facilis magnam minus repellat repellendus sunt ullam.
|
|
377
|
+
</p>
|
|
378
|
+
<p>
|
|
379
|
+
Adipisci aspernatur error expedita laboriosam laudantium nulla
|
|
380
|
+
pariatur repellat. Dolores iusto modi nam?
|
|
381
|
+
</p>
|
|
382
|
+
<p>
|
|
383
|
+
Accusantium alias, amet aperiam debitis dolor earum expedita explicabo
|
|
384
|
+
hic in iste modi nobis numquam officia perferendis quod repudiandae
|
|
385
|
+
sapiente sed voluptates.
|
|
386
|
+
</p>
|
|
387
|
+
</div>
|
|
388
|
+
<div className={'my-text'} style={{ marginTop: 24 }}>
|
|
389
|
+
<p>Unordered List:</p>
|
|
390
|
+
<ul className={'my-ul my-list-offset-items-8'}>
|
|
391
|
+
<li>Item 1</li>
|
|
392
|
+
<li>Item 2</li>
|
|
393
|
+
<li>Item 3</li>
|
|
394
|
+
</ul>
|
|
395
|
+
<p style={{ marginTop: 24 }}>Ordered List:</p>
|
|
396
|
+
<ol className={'my-ol my-ol-alpha-lower'}>
|
|
397
|
+
<li>Item 1</li>
|
|
398
|
+
<li>Item 2</li>
|
|
399
|
+
<li>Item 3</li>
|
|
400
|
+
</ol>
|
|
401
|
+
<p style={{ marginTop: 24 }}>
|
|
402
|
+
<span className="my-link">Classic link</span>
|
|
403
|
+
</p>
|
|
404
|
+
<p style={{ marginTop: 8 }}>
|
|
405
|
+
<span className="my-link my-link_standalone">Standalone link</span>
|
|
406
|
+
</p>
|
|
407
|
+
<p style={{ marginTop: 8 }}>
|
|
408
|
+
<span className="my-link my-link_external_pale">
|
|
409
|
+
External pale link
|
|
410
|
+
</span>
|
|
411
|
+
</p>
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
);
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
render(<MyTypography />);
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
```postcss
|
|
421
|
+
@import '@rescui/typography/lib/public-api.p.css';
|
|
422
|
+
|
|
423
|
+
.my-heading {
|
|
424
|
+
@mixin rs-typography-h2-full;
|
|
425
|
+
}
|
|
426
|
+
.my-text {
|
|
427
|
+
@mixin rs-typography-text-2-full;
|
|
428
|
+
}
|
|
429
|
+
.my-ul {
|
|
430
|
+
@mixin rs-typography-ul-full;
|
|
431
|
+
}
|
|
432
|
+
.my-ol {
|
|
433
|
+
@mixin rs-typography-ol-full;
|
|
434
|
+
}
|
|
435
|
+
.my-link {
|
|
436
|
+
@mixin rs-typography-link-full;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* MODIFIERS */
|
|
440
|
+
.my-heading_hardness_average {
|
|
441
|
+
@mixin rs-typography-heading-hardness-average;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.my-text_auto-offset {
|
|
445
|
+
@mixin rs-typography-paragraph-auto-offset-styles;
|
|
446
|
+
}
|
|
447
|
+
.my-text_hardness_hard {
|
|
448
|
+
@mixin rs-typography-hardness-hard;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.my-list-offset-items-8 {
|
|
452
|
+
@mixin rs-typography-list-offset-items-8;
|
|
453
|
+
}
|
|
454
|
+
.my-ol-alpha-lower {
|
|
455
|
+
@mixin rs-typography-ol-alpha-lower;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.my-link_standalone {
|
|
459
|
+
@mixin rs-typography-link-mode-standalone;
|
|
460
|
+
}
|
|
461
|
+
.my-link_external_pale {
|
|
462
|
+
@mixin rs-typography-link-external-true;
|
|
463
|
+
@mixin rs-typography-link-hardness-pale;
|
|
464
|
+
}
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
## Adaptivity
|
|
468
|
+
|
|
469
|
+
### Adaptivity mixins
|
|
470
|
+
|
|
471
|
+
`Adaptivity` mixins are useful in situations where you need to fine-tune how typography styles change across different screen widths.
|
|
472
|
+
|
|
473
|
+
These mixins are already applied to the typography styles by default under the corresponding media queries, but you can use them to adjust some of the adaptivity rules at different breakpoints.
|
|
474
|
+
|
|
475
|
+
Check out the [headings](/typography/headings/#adaptivity), [subtitles](/typography/subtitles/#adaptivity) and [digits](/typography/digits/#adaptivity) default adaptivity rules.
|
|
476
|
+
|
|
477
|
+
| Mixin name | Details |
|
|
478
|
+
| --- | --- |
|
|
479
|
+
| `rs-typography-digits-1-sm` | Apply digits-1 `--sm` css variables |
|
|
480
|
+
| `rs-typography-super-hero-md` | Apply super-hero `--md` css variables |
|
|
481
|
+
| `rs-typography-super-hero-sm` | Apply super-hero `--sm` css variables |
|
|
482
|
+
| `rs-typography-middle-hero-sm` | Apply middle-hero `--sm` css variables |
|
|
483
|
+
| `rs-typography-hero-sm` | Apply hero `--sm` css variables |
|
|
484
|
+
| `rs-typography-subtitle-1-sm` | Apply subtitle-1 `--sm` css variables |
|
|
485
|
+
| `rs-typography-subtitle-2-sm` | Apply subtitle-2 `--sm` css variables |
|
|
486
|
+
| `rs-typography-h1-sm` | Apply h1 `--sm` css variables |
|
|
487
|
+
| `rs-typography-h2-sm` | Apply h2 `--sm` css variables |
|
|
488
|
+
| `rs-typography-h3-plus-sm` | Apply h3-plus `--sm` css variables |
|
|
489
|
+
| `rs-typography-text-1-sm` | Apply text-1 `--sm` css variables |
|
|
490
|
+
| `rs-typography-text-2-sm` | Apply text-2 `--sm` css variables |
|
|
491
|
+
| `rs-typography-list-offset-items-16-sm` | Apply `--sm` css variables for list offsetItems: 16 |
|
|
492
|
+
| `rs-typography-list-offset-items-24-sm` | Apply `--sm` css variables for list offsetItems: 24 |
|
|
493
|
+
| `rs-typography-sm` | Contains `--sm` styles of all typography elements |
|
|
494
|
+
| `rs-typography-md` | Contains `--md` styles of all typography elements |
|
|
495
|
+
|
|
496
|
+
#### Demo
|
|
497
|
+
|
|
498
|
+
```tsx
|
|
499
|
+
import cn from 'classnames';
|
|
500
|
+
import { textCn } from '@rescui/typography';
|
|
501
|
+
|
|
502
|
+
const MyTypography = () => {
|
|
503
|
+
return (
|
|
504
|
+
<div style={{ maxWidth: 800 }}>
|
|
505
|
+
<h1 className={cn(textCn('rs-middle-hero'), 'smaller-middle-hero-on-md')}>
|
|
506
|
+
Has --sm styles on --md
|
|
507
|
+
</h1>
|
|
508
|
+
</div>
|
|
509
|
+
);
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
render(<MyTypography />);
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
```postcss
|
|
516
|
+
@import '@rescui/typography/lib/public-api.p.css';
|
|
517
|
+
|
|
518
|
+
.smaller-middle-hero-on-md {
|
|
519
|
+
@media (--md) {
|
|
520
|
+
@mixin rs-typography-middle-hero-sm;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
## Color
|
|
526
|
+
|
|
527
|
+
### Color mixins
|
|
528
|
+
|
|
529
|
+
These mixins can be used on any elements, they provide the final `color` CSS property with specific typography value.
|
|
530
|
+
|
|
531
|
+
| Mixin name | Details |
|
|
532
|
+
| --- | --- |
|
|
533
|
+
| `rs-typography-color-hard` | style: `color`<br><br>value: `typography-hard-color`<br><br>Add `color` css-property with hard typography color |
|
|
534
|
+
| `rs-typography-color-average` | style: `color`<br><br>value: `typography-average-color`<br><br>Add `color` css-property with average typography color |
|
|
535
|
+
| `rs-typography-color-pale` | style: `color`<br><br>value: `typography-pale-color`<br><br>Add `color` css-property with pale typography color |
|
|
536
|
+
| `rs-typography-color-base` | style: `color`<br><br>value: `typography-base-color`<br><br>Add `color` css-property with base typography color (inherited from the text base style) |
|
|
537
|
+
|
|
538
|
+
#### Demo
|
|
539
|
+
|
|
540
|
+
```tsx
|
|
541
|
+
import { CompanyIcon } from '@rescui/icons';
|
|
542
|
+
|
|
543
|
+
const MyTypography = () => {
|
|
544
|
+
return (
|
|
545
|
+
<div style={{ maxWidth: 800 }}>
|
|
546
|
+
<CompanyIcon size="l" className="my-icon" />
|
|
547
|
+
</div>
|
|
548
|
+
);
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
render(<MyTypography />);
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
```postcss
|
|
555
|
+
@import '@rescui/typography/lib/public-api.p.css';
|
|
556
|
+
|
|
557
|
+
.my-icon {
|
|
558
|
+
@mixin rs-typography-color-average;
|
|
559
|
+
}
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
## Legacy
|
|
563
|
+
|
|
564
|
+
### Intro
|
|
565
|
+
|
|
566
|
+
These mixins are considered legacy. They were used before the `1.0.0` version.
|
|
567
|
+
|
|
568
|
+
Use [Full](/typography/advanced-css-api/full/) and other mixins with auto theme resolving instead.
|
|
569
|
+
|
|
570
|
+
##### Usage
|
|
571
|
+
|
|
572
|
+
Import: `@import '@rescui/typography/lib/mixins.p.css';`
|
|
573
|
+
|
|
574
|
+
#### `Text Base` mixins
|
|
575
|
+
|
|
576
|
+
| Mixin name | Details |
|
|
577
|
+
| --- | --- |
|
|
578
|
+
| `rs-super-hero-base` | value: `"rs-super-hero"`<br><br>Apply super-hero text styles to the element. `color` property excluded. |
|
|
579
|
+
| `rs-middle-hero-base` | value: `"rs-middle-hero"`<br><br>Apply middle-hero text styles to the element. `color` property excluded. |
|
|
580
|
+
| `rs-digits-1-base` | value: `"rs-digits-1"`<br><br>Apply digits-1 text styles to the element. `color` property excluded. |
|
|
581
|
+
| `rs-digits-2-base` | value: `"rs-digits-2"`<br><br>Apply digits-2 text styles to the element. `color` property excluded. |
|
|
582
|
+
| `rs-hero-base` | value: `"rs-hero"`<br><br>Apply hero text styles to the element. `color` property excluded. |
|
|
583
|
+
| `rs-subtitle-1-base` | value: `"rs-subtitle-1"`<br><br>Apply subtitle-1 text styles to the element. `color` property excluded. |
|
|
584
|
+
| `rs-h1-base` | value: `"rs-h1"`<br><br>Apply h1 text styles to the element. `color` property excluded. |
|
|
585
|
+
| `rs-subtitle-2-base` | value: `"rs-subtitle-2"`<br><br>Apply subtitle-2 text styles to the element. `color` property excluded. |
|
|
586
|
+
| `rs-h2-base` | value: `"rs-h2"`<br><br>Apply h2 text styles to the element. `color` property excluded. |
|
|
587
|
+
| `rs-h3-plus-base` | value: `"rs-h3-plus"`<br><br>Apply h3-plus text styles to the element. `color` property excluded. |
|
|
588
|
+
| `rs-h3-base` | value: `"rs-h3"`<br><br>Apply h3 text styles to the element. `color` property excluded. |
|
|
589
|
+
| `rs-text-1-base` | value: `"rs-text-1"`<br><br>Apply text-1 text styles to the element. `color` property excluded. |
|
|
590
|
+
| `rs-h4-base` | value: `"rs-h4"`<br><br>Apply h4 text styles to the element. `color` property excluded. |
|
|
591
|
+
| `rs-text-2-base` | value: `"rs-text-2"`<br><br>Apply text-2 text styles to the element. `color` property excluded. |
|
|
592
|
+
| `rs-h5-base` | value: `"rs-h5"`<br><br>Apply h5 text styles to the element. `color` property excluded. |
|
|
593
|
+
| `rs-text-3-base` | value: `"rs-text-3"`<br><br>Apply text-3 text styles to the element. `color` property excluded. |
|
|
594
|
+
|
|
595
|
+
#### `Text Full` mixins
|
|
596
|
+
|
|
597
|
+
| Mixin name | Details |
|
|
598
|
+
| --- | --- |
|
|
599
|
+
| `rs-super-hero` | theme: `"light"`<br><br>value: `"rs-super-hero"`<br><br>Apply light themed super-hero text styles to the element |
|
|
600
|
+
| `rs-middle-hero` | theme: `"light"`<br><br>value: `"rs-middle-hero"`<br><br>Apply light themed middle-hero text styles to the element |
|
|
601
|
+
| `rs-digits-1` | theme: `"light"`<br><br>value: `"rs-digits-1"`<br><br>Apply light themed digits-1 text styles to the element |
|
|
602
|
+
| `rs-digits-2` | theme: `"light"`<br><br>value: `"rs-digits-2"`<br><br>Apply light themed digits-2 text styles to the element |
|
|
603
|
+
| `rs-hero` | theme: `"light"`<br><br>value: `"rs-hero"`<br><br>Apply light themed hero text styles to the element |
|
|
604
|
+
| `rs-subtitle-1` | theme: `"light"`<br><br>value: `"rs-subtitle-1"`<br><br>Apply light themed subtitle-1 text styles to the element |
|
|
605
|
+
| `rs-h1` | theme: `"light"`<br><br>value: `"rs-h1"`<br><br>Apply light themed h1 text styles to the element |
|
|
606
|
+
| `rs-subtitle-2` | theme: `"light"`<br><br>value: `"rs-subtitle-2"`<br><br>Apply light themed subtitle-2 text styles to the element |
|
|
607
|
+
| `rs-h2` | theme: `"light"`<br><br>value: `"rs-h2"`<br><br>Apply light themed h2 text styles to the element |
|
|
608
|
+
| `rs-h3-plus` | theme: `"light"`<br><br>value: `"rs-h3-plus"`<br><br>Apply light themed h3 text styles to the element |
|
|
609
|
+
| `rs-h3` | theme: `"light"`<br><br>value: `"rs-h3"`<br><br>Apply light themed h3 text styles to the element |
|
|
610
|
+
| `rs-text-1` | theme: `"light"`<br><br>value: `"rs-text-1"`<br><br>Apply light themed text-1 text styles to the element |
|
|
611
|
+
| `rs-h4` | theme: `"light"`<br><br>value: `"rs-h4"`<br><br>Apply light themed h4 text styles to the element |
|
|
612
|
+
| `rs-text-2` | theme: `"light"`<br><br>value: `"rs-text-2"`<br><br>Apply light themed text-2 text styles to the element |
|
|
613
|
+
| `rs-h5` | theme: `"light"`<br><br>value: `"rs-h5"`<br><br>Apply light themed h5 text styles to the element |
|
|
614
|
+
| `rs-overline` | theme: `"light"`<br><br>value: `"rs-overline"`<br><br>Apply light themed overline text styles to the element |
|
|
615
|
+
| `rs-text-3` | theme: `"light"`<br><br>value: `"rs-text-3"`<br><br>Apply light themed text-3 text styles to the element |
|
|
616
|
+
|
|
617
|
+
#### `Text Dark` mixins
|
|
618
|
+
|
|
619
|
+
| Mixin name | Details |
|
|
620
|
+
| --- | --- |
|
|
621
|
+
| `rs-super-hero-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the super-hero styled element |
|
|
622
|
+
| `rs-middle-hero-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the middle-hero styled element |
|
|
623
|
+
| `rs-digits-1-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the digits-1 styled element |
|
|
624
|
+
| `rs-digits-2-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the digits-2 styled element |
|
|
625
|
+
| `rs-hero-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the hero styled element |
|
|
626
|
+
| `rs-subtitle-1-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the subtitle-1 styled element |
|
|
627
|
+
| `rs-h1-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the h1 styled element |
|
|
628
|
+
| `rs-subtitle-2-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the subtitle-2 styled element |
|
|
629
|
+
| `rs-h2-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the h2 styled element |
|
|
630
|
+
| `rs-h3-plus-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the h3-plus styled element |
|
|
631
|
+
| `rs-h3-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the h3 styled element |
|
|
632
|
+
| `rs-text-1-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the text-1 styled element |
|
|
633
|
+
| `rs-h4-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the h4 styled element |
|
|
634
|
+
| `rs-text-2-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the text-2 styled element |
|
|
635
|
+
| `rs-h5-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the h5 styled element |
|
|
636
|
+
| `rs-overline-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the overline styled element |
|
|
637
|
+
| `rs-text-3-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Apply dark themed color to the text-3 styled element |
|
|
638
|
+
|
|
639
|
+
#### `Text Offset` mixins
|
|
640
|
+
|
|
641
|
+
| Mixin name | Details |
|
|
642
|
+
| --- | --- |
|
|
643
|
+
| `rs-super-hero-offset-top` | value: `"96px"`<br><br>Apply top margin CSS to the super-hero element |
|
|
644
|
+
| `rs-middle-hero-offset-top` | value: `"96px"`<br><br>Apply top margin CSS to the middle-hero element |
|
|
645
|
+
| `rs-digits-1-offset-top` | value: `"32px"`<br><br>Apply top margin CSS to the digits-1 element |
|
|
646
|
+
| `rs-digits-2-offset-top` | value: `"32px"`<br><br>Apply top margin CSS to the digits-2 element |
|
|
647
|
+
| `rs-hero-offset-top` | value: `"96px"`<br><br>Apply top margin CSS to the hero element |
|
|
648
|
+
| `rs-subtitle-1-offset-top` | value: `"32px"`<br><br>Apply top margin CSS to the subtitle-1 element |
|
|
649
|
+
| `rs-h1-offset-top` | value: `"64px"`<br><br>Apply top margin CSS to the h1 element |
|
|
650
|
+
| `rs-subtitle-2-offset-top` | value: `"32px"`<br><br>Apply top margin CSS to the subtitle-2 element |
|
|
651
|
+
| `rs-h2-offset-top` | value: `"48px"`<br><br>Apply top margin CSS to the h2 element |
|
|
652
|
+
| `rs-h3-plus-offset-top` | value: `"32px"`<br><br>Apply top margin CSS to the h3-plus element |
|
|
653
|
+
| `rs-h3-offset-top` | value: `"32px"`<br><br>Apply top margin CSS to the h3 element |
|
|
654
|
+
| `rs-text-1-offset-top` | value: `"32px"`<br><br>Apply top margin CSS to the text-1 element |
|
|
655
|
+
| `rs-h4-offset-top` | value: `"16px"`<br><br>Apply top margin CSS to the h4 element |
|
|
656
|
+
| `rs-text-2-offset-top` | value: `"16px"`<br><br>Apply top margin CSS to the text-2 element |
|
|
657
|
+
| `rs-h5-offset-top` | value: `"16px"`<br><br>Apply top margin CSS to the h5 element |
|
|
658
|
+
| `rs-overline-offset-top` | value: `"16px"`<br><br>Apply top margin CSS to the overline element |
|
|
659
|
+
| `rs-text-3-offset-top` | value: `"8px"`<br><br>Apply top margin CSS to the text-3 element |
|
|
660
|
+
| `rs-pre-offset-top` | value: `"16px"`<br><br>Apply top margin CSS to the pre element |
|
|
661
|
+
|
|
662
|
+
#### `Text Mods` mixins
|
|
663
|
+
|
|
664
|
+
| Mixin name | Details |
|
|
665
|
+
| --- | --- |
|
|
666
|
+
| `rs-text-hardness-hard` | theme: `"light"`<br><br>prop: `hardness`<br><br>value: `"hard"`<br><br>Set light theme and hard color to the text element |
|
|
667
|
+
| `rs-text-hardness-average` | theme: `"light"`<br><br>prop: `hardness`<br><br>value: `"average"`<br><br>Set light theme and average color to the text element |
|
|
668
|
+
| `rs-text-hardness-pale` | theme: `"light"`<br><br>prop: `hardness`<br><br>value: `"pale"`<br><br>Set light theme and pale color to the text element |
|
|
669
|
+
| `rs-text-hardness-hard-theme-dark` | theme: `"dark"`<br><br>prop: `hardness`<br><br>value: `"hard"`<br><br>Set dark theme and hard color to the text element |
|
|
670
|
+
| `rs-text-hardness-average-theme-dark` | theme: `"dark"`<br><br>prop: `hardness`<br><br>value: `"average"`<br><br>Set dark theme and average color to the text element |
|
|
671
|
+
| `rs-text-hardness-pale-theme-dark` | theme: `"dark"`<br><br>prop: `hardness`<br><br>value: `"pale"`<br><br>Set dark theme and pale color to the text element |
|
|
672
|
+
|
|
673
|
+
#### `List Mods` mixins
|
|
674
|
+
|
|
675
|
+
| Mixin name | Details |
|
|
676
|
+
| --- | --- |
|
|
677
|
+
| `rs-core-list-offset-items-4` | prop: `offset-items`<br><br>value: `4`<br><br>Set 4px offset between list items. |
|
|
678
|
+
| `rs-core-list-offset-items-8` | prop: `offset-items`<br><br>value: `8`<br><br>Set 8px offset between list items. |
|
|
679
|
+
| `rs-core-list-offset-items-12` | prop: `offset-items`<br><br>value: `12`<br><br>Set 12px offset between list items. |
|
|
680
|
+
| `rs-core-list-offset-items-16` | prop: `offset-items`<br><br>value: `16`<br><br>smValue: `12`<br><br>Set 16px offset between list items. Auto change to 12px on sm breakpoint |
|
|
681
|
+
| `rs-core-list-offset-items-24` | prop: `offset-items`<br><br>value: `24`<br><br>smValue: `16`<br><br>Set 24px offset between list items. Auto change to 16px on sm breakpoint |
|
|
682
|
+
| `rs-ol-alpha-lower` | prop: `alpha`<br><br>value: `"lower"`<br><br>Apply `alpha-lower` counter to the ol list |
|
|
683
|
+
| `rs-ol-alpha-upper` | prop: `alpha`<br><br>value: `"upper"`<br><br>Apply `alpha-upper` counter to the ol list |
|
|
684
|
+
| `rs-ul-text-1` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
685
|
+
| `rs-ul-text-2` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
686
|
+
| `rs-ul-text-3` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
687
|
+
| `rs-ol-text-1` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
688
|
+
| `rs-ol-text-2` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
689
|
+
| `rs-ol-text-3` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
690
|
+
|
|
691
|
+
#### `List` mixins
|
|
692
|
+
|
|
693
|
+
| Mixin name | Details |
|
|
694
|
+
| --- | --- |
|
|
695
|
+
| `rs-ul` | value: `"rs-ul"`<br><br>Apply ul styles to the element |
|
|
696
|
+
| `rs-ol` | value: `"rs-ol"`<br><br>Apply ol styles to the element |
|
|
697
|
+
| `rs-core-list` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
698
|
+
|
|
699
|
+
#### `Pre` mixins
|
|
700
|
+
|
|
701
|
+
| Mixin name | Details |
|
|
702
|
+
| --- | --- |
|
|
703
|
+
| `rs-pre` | theme: `"light"`<br><br>value: `"rs-pre"`<br><br>Apply pre styles to the element |
|
|
704
|
+
| `rs-pre-theme-dark` | prop: `"theme"`<br><br>value: `"dark"`<br><br>Set dark theme to the pre element |
|
|
705
|
+
| `rs-pre-child-code-direct` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
706
|
+
| `rs-pre-child-code` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
707
|
+
|
|
708
|
+
#### `Code` mixins
|
|
709
|
+
|
|
710
|
+
| Mixin name | Details |
|
|
711
|
+
| --- | --- |
|
|
712
|
+
| `rs-code` | theme: `"light"`<br><br>value: `"rs-code"`<br><br>Apply code styles to the element |
|
|
713
|
+
| `rs-code-theme-dark` | prop: `"theme"`<br><br>value: `"dark"`<br><br>Set dark theme to the code element |
|
|
714
|
+
|
|
715
|
+
#### `Link` mixins
|
|
716
|
+
|
|
717
|
+
| Mixin name | Details |
|
|
718
|
+
| --- | --- |
|
|
719
|
+
| `rs-link` | theme: `"light"`<br><br>value: `"rs-link"`<br><br>Apply link styles to the element |
|
|
720
|
+
| `rs-link-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Set dark theme to the link element |
|
|
721
|
+
|
|
722
|
+
#### `Link Mods` mixins
|
|
723
|
+
|
|
724
|
+
| Mixin name | Details |
|
|
725
|
+
| --- | --- |
|
|
726
|
+
| `rs-link-hardness-hard` | theme: `"light"`<br><br>prop: `hardness`<br><br>value: `"hard"`<br><br>Set light theme and hard color to the link element |
|
|
727
|
+
| `rs-link-hardness-average` | theme: `"light"`<br><br>prop: `hardness`<br><br>value: `"average"`<br><br>Set light theme and average color to the link element |
|
|
728
|
+
| `rs-link-hardness-pale` | theme: `"light"`<br><br>prop: `hardness`<br><br>value: `"pale"`<br><br>Set light theme and pale color to the link element |
|
|
729
|
+
| `rs-link-external` | prop: `external`<br><br>value: `true`<br><br>Set link to external |
|
|
730
|
+
| `rs-link-mode-classic` | prop: `mode`<br><br>value: `"classic"`<br><br>Set link mode to classic |
|
|
731
|
+
| `rs-link-mode-rock` | prop: `mode`<br><br>value: `"rock"`<br><br>Set link mode to rock |
|
|
732
|
+
| `rs-link-mode-standalone` | prop: `mode`<br><br>value: `"standalone"`<br><br>Set link mode to standalone |
|
|
733
|
+
| `rs-link-mode-clear` | prop: `mode`<br><br>value: `"clear"`<br><br>Set link mode to clear |
|
|
734
|
+
| `rs-link-hardness-hard-theme-dark` | theme: `"dark"`<br><br>prop: `hardness`<br><br>value: `"hard"`<br><br>Set dark theme and hard color to the link element |
|
|
735
|
+
| `rs-link-hardness-average-theme-dark` | theme: `"dark"`<br><br>prop: `hardness`<br><br>value: `"average"`<br><br>Set dark theme and average color to the link element |
|
|
736
|
+
| `rs-link-hardness-pale-theme-dark` | theme: `"dark"`<br><br>prop: `hardness`<br><br>value: `"pale"`<br><br>Set dark theme and pale color to the link element |
|
|
737
|
+
| `rs-link-mode-classic-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Set dark theme to the link element |
|
|
738
|
+
| `rs-link-mode-rock-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Set dark theme to the link element |
|
|
739
|
+
| `rs-link-mode-standalone-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Set dark theme to the link element |
|
|
740
|
+
| `rs-link-mode-clear-theme-dark` | prop: `theme`<br><br>value: `"dark"`<br><br>Set dark theme to the link element |
|
|
741
|
+
| `rs-link-mode-standalone-external` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
742
|
+
| `rs-link-mode-standalone-big-heading` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
743
|
+
| `rs-link-mode-standalone-external-big-heading` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
744
|
+
| `rs-link-mode-standalone-overline` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
745
|
+
| `rs-link-mode-standalone-external-overline` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
746
|
+
|
|
747
|
+
#### Unclassified mixins
|
|
748
|
+
|
|
749
|
+
| Mixin name | Details |
|
|
750
|
+
| --- | --- |
|
|
751
|
+
| `rs-font-smoothing` | Apply smoothing font styles |
|
|
752
|
+
| `rs-typography-light` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|
|
753
|
+
| `rs-typography-dark` | deprecated: `true`<br><br>Deprecated. Does nothing. |
|