prewindcss 1.0.0

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.
Files changed (4) hide show
  1. package/README.md +702 -0
  2. package/package.json +21 -0
  3. package/prewind.css +2545 -0
  4. package/theme.css +102 -0
package/README.md ADDED
@@ -0,0 +1,702 @@
1
+ <!--
2
+ TODO: Before publishing, replace these placeholders:
3
+
4
+ - [CDN_URL] - The actual CDN URL for prewind.css
5
+ - [GITHUB_THEME_URL] - The URL to the default theme.css in the GitHub repo
6
+ - [NPX_FLUID_COMMAND] - The npx command to generate fluid font and space sizes
7
+ -->
8
+
9
+ # Prewind
10
+
11
+ A lightweight CSS utility library with no build step. Prewind provides the most useful utilities for everyday styling while encouraging a simpler, more maintainable approach to CSS. The entire library is ~7KB gzipped. No build step, no purging, no tree-shaking — just one CSS file.
12
+
13
+ Created by [Codepilot](https://codepilot.com). Inspired by [Tailwind CSS](https://tailwindcss.com) and [Utopia](https://utopia.fyi).
14
+
15
+ ## Philosophy: Global First
16
+
17
+ Prewind follows a "Global First" approach to styling. Instead of reaching for utility classes by default, start with global CSS and get more specific only when needed:
18
+
19
+ 1. **Global CSS for global styles.** Navigation links, typography defaults, form elements — things that should look the same everywhere belong in your global stylesheets.
20
+
21
+ 2. **Utility classes for one-offs.** When you need to tweak spacing, change a color, or adjust layout for a specific element, use a utility class. This is where Prewind shines.
22
+
23
+ 3. **Inline styles for arbitrary values.** If you need a margin of exactly 37px for one specific case, use a `style` attribute. Don't fight the platform.
24
+
25
+ This approach keeps your HTML readable. You won't end up with 30 classes on a single element.
26
+
27
+ Prewind works with the platform, not around it. CSS already has a cascade, variables, and specificity rules that work well — we don't need to reinvent them.
28
+
29
+ ## Installation
30
+
31
+ ### 1. Load Prewind
32
+
33
+ Load Prewind from a CDN or host it yourself:
34
+
35
+ ```html
36
+ <link rel="stylesheet" href="[CDN_URL]/prewind.css" />
37
+ ```
38
+
39
+ ### 2. Define your theme variables
40
+
41
+ Prewind's utility classes reference CSS variables for colors, spacing, fonts, and other design tokens. You need to define these variables somewhere in your CSS — either in a separate file, or at the top of your global stylesheet.
42
+
43
+ You can copy the [default theme]([GITHUB_THEME_URL]) from the repository and customize it, or define the variables yourself:
44
+
45
+ ```css
46
+ :root {
47
+ --brand-1: #0284c7;
48
+ --font-body: "Inter", system-ui, sans-serif;
49
+ --space-md: 1.5rem;
50
+ /* ... see Theming section for full list */
51
+ }
52
+ ```
53
+
54
+ However you organize it, just make sure these variables are defined somewhere in your CSS.
55
+
56
+ ### 3. Set up CSS layers
57
+
58
+ Prewind uses CSS layers to manage the cascade. Utility classes should win over your component styles, so you want to define your layers with `prewind` last:
59
+
60
+ ```css
61
+ @layer reset, styles, prewind;
62
+ ```
63
+
64
+ Put this at the top of your main CSS file. Then wrap all of your own styles in the `styles` layer:
65
+
66
+ ```css
67
+ @layer reset, styles, prewind;
68
+
69
+ @layer styles {
70
+ .nav-link {
71
+ color: var(--brand-1);
72
+ font-weight: var(--font-bold);
73
+ }
74
+
75
+ .card {
76
+ background: var(--white);
77
+ border-radius: var(--rounded-lg);
78
+ }
79
+ }
80
+ ```
81
+
82
+ You can rename the `styles` layer or add more layers between `reset` and `prewind` — just make sure all of your layers are in the middle, between `reset` and `prewind`.
83
+
84
+ ## Theming
85
+
86
+ All of prewind's design decisions flow through CSS variables. To customize your site's look, edit these variables. These variables aren't just for utility classes — you can reference them in your own CSS too. This keeps your global styles and utility classes consistent.
87
+
88
+ ### Colors
89
+
90
+ Prewind uses simple, memorable color names:
91
+
92
+ **Brand colors** for your primary palette:
93
+
94
+ - `--brand-1`, `--brand-1-light`
95
+ - `--brand-2`, `--brand-2-light`
96
+ - `--brand-3`, `--brand-3-light`
97
+ - `--brand-4`, `--brand-4-light`
98
+
99
+ **Neutral colors** for things like text and backgrounds:
100
+
101
+ - `--black`, `--darker`, `--dark`, `--midtone`, `--light`, `--lighter`, `--white`
102
+
103
+ **Semantic colors** for UI feedback:
104
+
105
+ - `--success`, `--success-light`
106
+ - `--info`, `--info-light`
107
+ - `--warning`, `--warning-light`
108
+ - `--error`, `--error-light`
109
+ - `--link`
110
+ - `--highlight`
111
+
112
+ ## Fluid Sizing
113
+
114
+ Prewind uses t-shirt sizes for spacing and typography: `3xs`, `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`.
115
+
116
+ These aren't arbitrary — they're generated using the same math as [Utopia](https://utopia.fyi). Each size scales fluidly with the viewport using CSS `clamp()`, and the proportional relationship between sizes stays constant. So when the viewport grows, `md` and `lg` both get bigger, but `lg` is always the same ratio larger than `md`.
117
+
118
+ This gives you responsive typography and spacing without writing media queries, and it enforces a consistent design system. You pick from a constrained set of sizes, which leads to more harmonious layouts than choosing arbitrary pixel values.
119
+
120
+ To generate custom fluid sizes for your project:
121
+
122
+ ```bash
123
+ [NPX_FLUID_COMMAND]
124
+ ```
125
+
126
+ This generates both the `--text-*` and `--space-*` variables for for you to copy/paste into your theme variables.
127
+
128
+ Note: The t-shirt sizes used for borders (`--border-sm`, `--border-lg`), border radius (`--rounded-sm`, `--rounded-lg`), and shadows (`shadow-sm`, `shadow-lg`, are not fluid — they're fixed values you set manually in your theme variables.
129
+
130
+ ## Prewind vs Tailwind
131
+
132
+ Prewind is a lightweight Tailwind alternative. It's for projects where you want utility classes without the complexity.
133
+
134
+ **Choose Prewind when:**
135
+
136
+ - You don't want a build step
137
+ - You prefer a constrained design system with t-shirt sizes
138
+ - You're comfortable writing global CSS for global styles
139
+ - You want a smaller library that covers most common cases
140
+
141
+ **Choose Tailwind when:**
142
+
143
+ - You want utilities for everything (grid, animations, transforms, gradients)
144
+ - You need arbitrary values like `w-[347px]`
145
+ - You want comprehensive hover/focus/active/disabled variants
146
+ - You don't mind using a build system
147
+
148
+ ### What Prewind leaves out
149
+
150
+ Prewind intentionally excludes some things to stay lightweight and encourage better practices:
151
+
152
+ **No grid utilities.** Flexbox covers most layout needs. For complex grids, write CSS.
153
+
154
+ **No animations, transitions, or transforms.** These are powerful features that benefit from being defined in one place (your global CSS) rather than scattered across utility classes.
155
+
156
+ **No predefined color palette.** Tailwind ships with hundreds of color utilities like `bg-sky-500`. Prewind uses semantic color names like `bg-brand-1` that you define yourself. You pick your own colors.
157
+
158
+ **No arbitrary values.** Instead of `m-[37px]`, use `style="margin: 37px"`. This keeps the utility class system constrained to your design tokens.
159
+
160
+ **No ring utilities.** Modern CSS supports `outline-radius`, so prewind uses outline utilities instead of the box-shadow workaround used for Tailwind `ring` utilities.
161
+
162
+ **Limited variants.** Hover variants exist for colors, background opacity, and cursor. Responsive variants exist for display, flexbox, and text alignment. That covers most real-world needs without exploding the file size.
163
+
164
+ The goal is useful utilities for most of what you need, most of the time — not coverage of every edge case.
165
+
166
+ ---
167
+
168
+ ## Reference
169
+
170
+ ### General
171
+
172
+ | Class | Property |
173
+ | ----------------- | ----------------------------------------------------------------------------------------- |
174
+ | `container` | `margin-inline: auto; padding-inline: var(--space-lg); width: clamp(360px, 100%, 1600px)` |
175
+ | `revert` | `all: revert` |
176
+ | `debug` | `outline: 2px dashed lime; outline-offset: -2px; background: rgba(0, 255, 0, 0.05)` |
177
+ | `appearance-none` | `appearance: none` |
178
+
179
+ ### Accessibility
180
+
181
+ | Class | Property |
182
+ | ------------- | ------------------------------------------------ |
183
+ | `sr-only` | Visually hidden but accessible to screen readers |
184
+ | `not-sr-only` | Reverses `sr-only` |
185
+
186
+ ### Aspect Ratio
187
+
188
+ | Class | Property |
189
+ | --------------- | ---------------------- |
190
+ | `aspect-square` | `aspect-ratio: 1 / 1` |
191
+ | `aspect-video` | `aspect-ratio: 16 / 9` |
192
+ | `aspect-auto` | `aspect-ratio: auto` |
193
+
194
+ ### Backdrop Blur
195
+
196
+ | Class | Property |
197
+ | -------------------- | ----------------------------- |
198
+ | `backdrop-blur-sm` | `backdrop-filter: blur(4px)` |
199
+ | `backdrop-blur` | `backdrop-filter: blur(8px)` |
200
+ | `backdrop-blur-lg` | `backdrop-filter: blur(16px)` |
201
+ | `backdrop-blur-none` | `backdrop-filter: none` |
202
+
203
+ ### Backgrounds
204
+
205
+ Background color classes use the `--bg-opacity` variable, allowing you to control opacity separately:
206
+
207
+ ```html
208
+ <div class="bg-brand-1 bg-opacity-50">50% opacity background</div>
209
+ ```
210
+
211
+ | Class | Property |
212
+ | -------------------- | ------------------------------------------------------------------- |
213
+ | `bg-{color}` | `background: rgb(from var(--{color}) r g b / var(--bg-opacity, 1))` |
214
+ | `bg-opacity-{0-100}` | `--bg-opacity: {value}` |
215
+
216
+ Available colors: `brand-1`, `brand-1-light`, `brand-2`, `brand-2-light`, `brand-3`, `brand-3-light`, `brand-4`, `brand-4-light`, `black`, `darker`, `dark`, `midtone`, `light`, `lighter`, `white`, `success`, `success-light`, `info`, `info-light`, `warning`, `warning-light`, `error`, `error-light`, `link`, `highlight`
217
+
218
+ Opacity values: `0`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`
219
+
220
+ ### Borders
221
+
222
+ **Width:**
223
+
224
+ | Class | Property |
225
+ | ----------- | ----------------------------------------------------- |
226
+ | `border` | `border-width: var(--border); border-style: solid` |
227
+ | `border-sm` | `border-width: var(--border-sm); border-style: solid` |
228
+ | `border-lg` | `border-width: var(--border-lg); border-style: solid` |
229
+ | `border-t` | Top border only (also `-sm`, `-lg` variants) |
230
+ | `border-r` | Right border only (also `-sm`, `-lg` variants) |
231
+ | `border-b` | Bottom border only (also `-sm`, `-lg` variants) |
232
+ | `border-l` | Left border only (also `-sm`, `-lg` variants) |
233
+
234
+ **Radius:**
235
+
236
+ | Class | Property |
237
+ | -------------- | ---------------------------------- |
238
+ | `rounded-none` | `border-radius: 0` |
239
+ | `rounded-sm` | `border-radius: var(--rounded-sm)` |
240
+ | `rounded` | `border-radius: var(--rounded)` |
241
+ | `rounded-lg` | `border-radius: var(--rounded-lg)` |
242
+ | `rounded-full` | `border-radius: 9999px` |
243
+
244
+ **Style:**
245
+
246
+ | Class | Property |
247
+ | --------------- | ---------------------- |
248
+ | `border-dashed` | `border-style: dashed` |
249
+ | `border-dotted` | `border-style: dotted` |
250
+
251
+ **Color:**
252
+
253
+ | Class | Property |
254
+ | ---------------- | ------------------------------ |
255
+ | `border-{color}` | `border-color: var(--{color})` |
256
+
257
+ Same colors as backgrounds.
258
+
259
+ ### Cursor
260
+
261
+ | Class | Property |
262
+ | -------------------- | --------------------- |
263
+ | `cursor-auto` | `cursor: auto` |
264
+ | `cursor-default` | `cursor: default` |
265
+ | `cursor-pointer` | `cursor: pointer` |
266
+ | `cursor-wait` | `cursor: wait` |
267
+ | `cursor-text` | `cursor: text` |
268
+ | `cursor-move` | `cursor: move` |
269
+ | `cursor-not-allowed` | `cursor: not-allowed` |
270
+ | `cursor-grab` | `cursor: grab` |
271
+ | `cursor-grabbing` | `cursor: grabbing` |
272
+
273
+ ### Display
274
+
275
+ | Class | Property |
276
+ | -------------- | ----------------------- |
277
+ | `block` | `display: block` |
278
+ | `inline-block` | `display: inline-block` |
279
+ | `inline` | `display: inline` |
280
+ | `flex` | `display: flex` |
281
+ | `inline-flex` | `display: inline-flex` |
282
+ | `hidden` | `display: none` |
283
+ | `contents` | `display: contents` |
284
+
285
+ ### Flexbox
286
+
287
+ **Container:**
288
+
289
+ | Class | Property |
290
+ | ------------------ | -------------------------------- |
291
+ | `flex-row` | `flex-direction: row` |
292
+ | `flex-col` | `flex-direction: column` |
293
+ | `flex-row-reverse` | `flex-direction: row-reverse` |
294
+ | `flex-col-reverse` | `flex-direction: column-reverse` |
295
+ | `flex-wrap` | `flex-wrap: wrap` |
296
+ | `flex-nowrap` | `flex-wrap: nowrap` |
297
+ | `justify-start` | `justify-content: flex-start` |
298
+ | `justify-center` | `justify-content: center` |
299
+ | `justify-end` | `justify-content: flex-end` |
300
+ | `justify-between` | `justify-content: space-between` |
301
+ | `justify-around` | `justify-content: space-around` |
302
+ | `items-start` | `align-items: flex-start` |
303
+ | `items-center` | `align-items: center` |
304
+ | `items-end` | `align-items: flex-end` |
305
+ | `items-stretch` | `align-items: stretch` |
306
+
307
+ **Item:**
308
+
309
+ | Class | Property |
310
+ | --------------- | ------------------------ |
311
+ | `self-start` | `align-self: flex-start` |
312
+ | `self-center` | `align-self: center` |
313
+ | `self-end` | `align-self: flex-end` |
314
+ | `self-stretch` | `align-self: stretch` |
315
+ | `flex-1` | `flex: 1 1 0%` |
316
+ | `flex-auto` | `flex: 1 1 auto` |
317
+ | `flex-none` | `flex: none` |
318
+ | `flex-grow` | `flex-grow: 1` |
319
+ | `flex-grow-0` | `flex-grow: 0` |
320
+ | `flex-shrink` | `flex-shrink: 1` |
321
+ | `flex-shrink-0` | `flex-shrink: 0` |
322
+
323
+ ### Gap
324
+
325
+ | Class | Property |
326
+ | -------------- | --------------------------------- |
327
+ | `gap-{size}` | `gap: var(--space-{size})` |
328
+ | `gap-x-{size}` | `column-gap: var(--space-{size})` |
329
+ | `gap-y-{size}` | `row-gap: var(--space-{size})` |
330
+
331
+ Sizes: `0`, `3xs`, `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`
332
+
333
+ ### Lists
334
+
335
+ | Class | Property |
336
+ | -------------- | ------------------------------ |
337
+ | `list-none` | `list-style-type: none` |
338
+ | `list-disc` | `list-style-type: disc` |
339
+ | `list-decimal` | `list-style-type: decimal` |
340
+ | `list-inside` | `list-style-position: inside` |
341
+ | `list-outside` | `list-style-position: outside` |
342
+
343
+ ### Margin
344
+
345
+ | Class | Property |
346
+ | ------------ | --------------------------------------- |
347
+ | `m-{size}` | `margin: var(--space-{size})` |
348
+ | `mt-{size}` | `margin-top: var(--space-{size})` |
349
+ | `mr-{size}` | `margin-right: var(--space-{size})` |
350
+ | `mb-{size}` | `margin-bottom: var(--space-{size})` |
351
+ | `ml-{size}` | `margin-left: var(--space-{size})` |
352
+ | `mx-{size}` | `margin-left` and `margin-right` |
353
+ | `my-{size}` | `margin-top` and `margin-bottom` |
354
+ | `-mt-{size}` | Negative top margin |
355
+ | `-mr-{size}` | Negative right margin |
356
+ | `-mb-{size}` | Negative bottom margin |
357
+ | `-ml-{size}` | Negative left margin |
358
+ | `m-auto` | `margin: auto` |
359
+ | `mt-auto` | `margin-top: auto` |
360
+ | `mr-auto` | `margin-right: auto` |
361
+ | `mb-auto` | `margin-bottom: auto` |
362
+ | `ml-auto` | `margin-left: auto` |
363
+ | `mx-auto` | `margin-left: auto; margin-right: auto` |
364
+ | `my-auto` | `margin-top: auto; margin-bottom: auto` |
365
+
366
+ Sizes: `0`, `3xs`, `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, `full`
367
+
368
+ ### Object Fit
369
+
370
+ | Class | Property |
371
+ | ------------------- | ------------------------ |
372
+ | `object-contain` | `object-fit: contain` |
373
+ | `object-cover` | `object-fit: cover` |
374
+ | `object-fill` | `object-fit: fill` |
375
+ | `object-0` | `object-fit: none` |
376
+ | `object-scale-down` | `object-fit: scale-down` |
377
+
378
+ ### Opacity
379
+
380
+ | Class | Property |
381
+ | ----------------- | ------------------ |
382
+ | `opacity-{0-100}` | `opacity: {value}` |
383
+
384
+ Values: `0`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`
385
+
386
+ ### Outlines
387
+
388
+ Prewind uses outlines instead of "ring" utilities. Modern CSS supports rounded outlines, so there's no need for the box-shadow workaround.
389
+
390
+ **Width:**
391
+
392
+ | Class | Property |
393
+ | ------------ | ------------------------------------------------------- |
394
+ | `outline` | `outline-width: var(--border); outline-style: solid` |
395
+ | `outline-sm` | `outline-width: var(--border-sm); outline-style: solid` |
396
+ | `outline-lg` | `outline-width: var(--border-lg); outline-style: solid` |
397
+ | `outline-0` | `outline-style: none` |
398
+
399
+ **Style:**
400
+
401
+ | Class | Property |
402
+ | ---------------- | ----------------------- |
403
+ | `outline-dashed` | `outline-style: dashed` |
404
+ | `outline-dotted` | `outline-style: dotted` |
405
+
406
+ **Color:**
407
+
408
+ | Class | Property |
409
+ | ----------------- | ------------------------------- |
410
+ | `outline-{color}` | `outline-color: var(--{color})` |
411
+
412
+ Same colors as backgrounds and borders.
413
+
414
+ ### Overflow
415
+
416
+ | Class | Property |
417
+ | -------------------- | --------------------- |
418
+ | `overflow-auto` | `overflow: auto` |
419
+ | `overflow-hidden` | `overflow: hidden` |
420
+ | `overflow-visible` | `overflow: visible` |
421
+ | `overflow-scroll` | `overflow: scroll` |
422
+ | `overflow-x-auto` | `overflow-x: auto` |
423
+ | `overflow-x-hidden` | `overflow-x: hidden` |
424
+ | `overflow-x-visible` | `overflow-x: visible` |
425
+ | `overflow-x-scroll` | `overflow-x: scroll` |
426
+ | `overflow-y-auto` | `overflow-y: auto` |
427
+ | `overflow-y-hidden` | `overflow-y: hidden` |
428
+ | `overflow-y-visible` | `overflow-y: visible` |
429
+ | `overflow-y-scroll` | `overflow-y: scroll` |
430
+
431
+ ### Padding
432
+
433
+ | Class | Property |
434
+ | ----------- | ------------------------------------- |
435
+ | `p-{size}` | `padding: var(--space-{size})` |
436
+ | `pt-{size}` | `padding-top: var(--space-{size})` |
437
+ | `pr-{size}` | `padding-right: var(--space-{size})` |
438
+ | `pb-{size}` | `padding-bottom: var(--space-{size})` |
439
+ | `pl-{size}` | `padding-left: var(--space-{size})` |
440
+ | `px-{size}` | `padding-left` and `padding-right` |
441
+ | `py-{size}` | `padding-top` and `padding-bottom` |
442
+
443
+ Sizes: `0`, `3xs`, `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, `full`
444
+
445
+ ### Pointer Events
446
+
447
+ | Class | Property |
448
+ | --------------------- | ---------------------- |
449
+ | `pointer-events-none` | `pointer-events: none` |
450
+ | `pointer-events-auto` | `pointer-events: auto` |
451
+
452
+ ### Position
453
+
454
+ | Class | Property |
455
+ | ---------- | -------------------------------------- |
456
+ | `static` | `position: static` |
457
+ | `relative` | `position: relative` |
458
+ | `absolute` | `position: absolute` |
459
+ | `fixed` | `position: fixed` |
460
+ | `sticky` | `position: sticky` |
461
+ | `inset-0` | `top: 0; right: 0; bottom: 0; left: 0` |
462
+ | `top-0` | `top: 0` |
463
+ | `right-0` | `right: 0` |
464
+ | `bottom-0` | `bottom: 0` |
465
+ | `left-0` | `left: 0` |
466
+
467
+ ### Resize
468
+
469
+ | Class | Property |
470
+ | ------------- | -------------------- |
471
+ | `resize-none` | `resize: none` |
472
+ | `resize` | `resize: both` |
473
+ | `resize-y` | `resize: vertical` |
474
+ | `resize-x` | `resize: horizontal` |
475
+
476
+ ### Shadows
477
+
478
+ | Class | Property |
479
+ | ------------- | ------------------------------ |
480
+ | `shadow-sm` | `box-shadow: var(--shadow-sm)` |
481
+ | `shadow` | `box-shadow: var(--shadow)` |
482
+ | `shadow-lg` | `box-shadow: var(--shadow-lg)` |
483
+ | `shadow-none` | `box-shadow: none` |
484
+
485
+ ### Sizing
486
+
487
+ **Width:**
488
+
489
+ | Class | Property |
490
+ | ---------- | -------------- |
491
+ | `w-0` | `width: 0` |
492
+ | `w-auto` | `width: auto` |
493
+ | `w-full` | `width: 100%` |
494
+ | `w-screen` | `width: 100vw` |
495
+
496
+ **Height:**
497
+
498
+ | Class | Property |
499
+ | ---------- | --------------- |
500
+ | `h-0` | `height: 0` |
501
+ | `h-auto` | `height: auto` |
502
+ | `h-full` | `height: 100%` |
503
+ | `h-screen` | `height: 100vh` |
504
+
505
+ **Min/Max:**
506
+
507
+ | Class | Property |
508
+ | -------------- | ------------------------------ |
509
+ | `min-w-0` | `min-width: 0` |
510
+ | `min-w-full` | `min-width: 100%` |
511
+ | `min-w-screen` | `min-width: 100vw` |
512
+ | `max-w-0` | `max-width: 0` |
513
+ | `max-w-full` | `max-width: 100%` |
514
+ | `max-w-screen` | `max-width: 100vw` |
515
+ | `max-w-form` | `max-width: var(--max-w-form)` |
516
+ | `max-w-text` | `max-width: var(--max-w-text)` |
517
+ | `min-h-0` | `min-height: 0` |
518
+ | `min-h-full` | `min-height: 100%` |
519
+ | `min-h-screen` | `min-height: 100vh` |
520
+ | `max-h-0` | `max-height: 0` |
521
+ | `max-h-full` | `max-height: 100%` |
522
+ | `max-h-screen` | `max-height: 100vh` |
523
+
524
+ ### Text
525
+
526
+ **Color:**
527
+
528
+ | Class | Property |
529
+ | -------------- | ----------------------- |
530
+ | `text-{color}` | `color: var(--{color})` |
531
+
532
+ Same colors as backgrounds.
533
+
534
+ **Size:**
535
+
536
+ | Class | Property |
537
+ | ----------- | ----------------------------- |
538
+ | `text-sm` | `font-size: var(--text-sm)` |
539
+ | `text-base` | `font-size: var(--text-base)` |
540
+ | `text-lg` | `font-size: var(--text-lg)` |
541
+ | `text-xl` | `font-size: var(--text-xl)` |
542
+ | `text-2xl` | `font-size: var(--text-2xl)` |
543
+ | `text-3xl` | `font-size: var(--text-3xl)` |
544
+ | `text-4xl` | `font-size: var(--text-4xl)` |
545
+
546
+ **Alignment:**
547
+
548
+ | Class | Property |
549
+ | -------------- | --------------------- |
550
+ | `text-left` | `text-align: left` |
551
+ | `text-center` | `text-align: center` |
552
+ | `text-right` | `text-align: right` |
553
+ | `text-justify` | `text-align: justify` |
554
+
555
+ **Decoration:**
556
+
557
+ | Class | Property |
558
+ | -------------- | ------------------------------------ |
559
+ | `underline` | `text-decoration-line: underline` |
560
+ | `line-through` | `text-decoration-line: line-through` |
561
+ | `no-underline` | `text-decoration-line: none` |
562
+
563
+ **Weight:**
564
+
565
+ | Class | Property |
566
+ | ------------- | --------------------------------- |
567
+ | `font-normal` | `font-weight: var(--font-normal)` |
568
+ | `font-bold` | `font-weight: var(--font-bold)` |
569
+
570
+ **Family:**
571
+
572
+ | Class | Property |
573
+ | -------------- | ---------------------------------- |
574
+ | `font-body` | `font-family: var(--font-body)` |
575
+ | `font-heading` | `font-family: var(--font-heading)` |
576
+
577
+ **Line Height:**
578
+
579
+ | Class | Property |
580
+ | ----------------- | -------------------- |
581
+ | `leading-tight` | `line-height: 1.25` |
582
+ | `leading-snug` | `line-height: 1.375` |
583
+ | `leading-normal` | `line-height: 1.5` |
584
+ | `leading-relaxed` | `line-height: 1.625` |
585
+
586
+ **Letter Spacing:**
587
+
588
+ | Class | Property |
589
+ | ----------------- | -------------------------- |
590
+ | `tracking-tight` | `letter-spacing: -0.025em` |
591
+ | `tracking-normal` | `letter-spacing: 0` |
592
+ | `tracking-wide` | `letter-spacing: 0.025em` |
593
+
594
+ **Transform:**
595
+
596
+ | Class | Property |
597
+ | ------------ | ---------------------------- |
598
+ | `uppercase` | `text-transform: uppercase` |
599
+ | `lowercase` | `text-transform: lowercase` |
600
+ | `capitalize` | `text-transform: capitalize` |
601
+
602
+ ### User Select
603
+
604
+ | Class | Property |
605
+ | ------------- | ------------------- |
606
+ | `select-none` | `user-select: none` |
607
+ | `select-text` | `user-select: text` |
608
+ | `select-all` | `user-select: all` |
609
+ | `select-auto` | `user-select: auto` |
610
+
611
+ ### Vertical Align
612
+
613
+ | Class | Property |
614
+ | ------------------- | ----------------------------- |
615
+ | `align-baseline` | `vertical-align: baseline` |
616
+ | `align-top` | `vertical-align: top` |
617
+ | `align-middle` | `vertical-align: middle` |
618
+ | `align-bottom` | `vertical-align: bottom` |
619
+ | `align-text-top` | `vertical-align: text-top` |
620
+ | `align-text-bottom` | `vertical-align: text-bottom` |
621
+
622
+ ### Visibility
623
+
624
+ | Class | Property |
625
+ | ----------- | --------------------- |
626
+ | `visible` | `visibility: visible` |
627
+ | `invisible` | `visibility: hidden` |
628
+
629
+ ### Whitespace
630
+
631
+ | Class | Property |
632
+ | --------------------- | ----------------------- |
633
+ | `whitespace-normal` | `white-space: normal` |
634
+ | `whitespace-nowrap` | `white-space: nowrap` |
635
+ | `whitespace-pre` | `white-space: pre` |
636
+ | `whitespace-pre-wrap` | `white-space: pre-wrap` |
637
+
638
+ ### Word Break
639
+
640
+ | Class | Property |
641
+ | -------------- | ---------------------------------------------------------------- |
642
+ | `break-normal` | `overflow-wrap: normal; word-break: normal` |
643
+ | `break-words` | `overflow-wrap: break-word` |
644
+ | `break-all` | `word-break: break-all` |
645
+ | `truncate` | `overflow: hidden; text-overflow: ellipsis; white-space: nowrap` |
646
+
647
+ ### Z-Index
648
+
649
+ | Class | Property |
650
+ | ------- | -------------- |
651
+ | `z-0` | `z-index: 0` |
652
+ | `z-10` | `z-index: 10` |
653
+ | `z-20` | `z-index: 20` |
654
+ | `z-30` | `z-index: 30` |
655
+ | `z-40` | `z-index: 40` |
656
+ | `z-50` | `z-index: 50` |
657
+ | `z-60` | `z-index: 60` |
658
+ | `z-70` | `z-index: 70` |
659
+ | `z-80` | `z-index: 80` |
660
+ | `z-90` | `z-index: 90` |
661
+ | `z-100` | `z-index: 100` |
662
+
663
+ ## Variants
664
+
665
+ ### Hover
666
+
667
+ Hover variants are available for colors, background opacity, and cursor:
668
+
669
+ | Prefix | Example |
670
+ | -------------------------- | ---------------------- |
671
+ | `hover:text-{color}` | `hover:text-brand-1` |
672
+ | `hover:bg-{color}` | `hover:bg-brand-1` |
673
+ | `hover:bg-opacity-{value}` | `hover:bg-opacity-50` |
674
+ | `hover:cursor-{type}` | `hover:cursor-pointer` |
675
+
676
+ ### Responsive
677
+
678
+ Responsive variants are available for display, flexbox, and text alignment at four breakpoints:
679
+
680
+ | Prefix | Breakpoint |
681
+ | ------ | ---------- |
682
+ | `sm:` | 640px |
683
+ | `md:` | 768px |
684
+ | `lg:` | 1024px |
685
+ | `xl:` | 1280px |
686
+
687
+ **Available responsive utilities:**
688
+
689
+ - Display: `hidden`, `block`, `inline-block`, `inline`, `flex`, `inline-flex`
690
+ - Flex direction: `flex-row`, `flex-col`, `flex-row-reverse`, `flex-col-reverse`
691
+ - Flex wrap: `flex-wrap`, `flex-nowrap`
692
+ - Justify: `justify-start`, `justify-center`, `justify-end`, `justify-between`, `justify-around`
693
+ - Align: `items-start`, `items-center`, `items-end`, `items-stretch`
694
+ - Text alignment: `text-left`, `text-center`, `text-right`, `text-justify`
695
+
696
+ Example:
697
+
698
+ ```html
699
+ <div class="flex flex-col md:flex-row gap-md">
700
+ <div class="hidden lg:block">Visible on large screens</div>
701
+ </div>
702
+ ```