mancha 0.23.1 → 0.24.1

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 (78) hide show
  1. package/README.md +25 -7
  2. package/dist/browser.d.ts +454 -3
  3. package/dist/browser.js +32 -1
  4. package/dist/css_custom.d.ts +1 -1
  5. package/dist/css_custom.js +44 -11
  6. package/dist/css_custom.js.map +1 -1
  7. package/dist/css_gen_utils.d.ts +8 -915
  8. package/dist/css_gen_utils.js +382 -641
  9. package/dist/css_gen_utils.js.map +1 -1
  10. package/dist/mancha.js +25 -36
  11. package/dist/plugins.js +11 -1
  12. package/dist/plugins.js.map +1 -1
  13. package/dist/renderer.js +5 -1
  14. package/dist/renderer.js.map +1 -1
  15. package/dist/store.d.ts +38 -2
  16. package/dist/store.js +215 -35
  17. package/dist/store.js.map +1 -1
  18. package/dist/trusted_attributes.d.ts +0 -3
  19. package/dist/trusted_attributes.js +1 -3
  20. package/dist/trusted_attributes.js.map +1 -1
  21. package/docs/02_initialization.md +2 -2
  22. package/docs/03_reactivity.md +26 -3
  23. package/docs/05_css.md +314 -282
  24. package/package.json +19 -4
  25. package/.biomeignore +0 -3
  26. package/.github/workflows/ci.yml +0 -109
  27. package/.vscode/extensions.json +0 -3
  28. package/.vscode/launch.json +0 -34
  29. package/biome.json +0 -46
  30. package/dist/browser.js.map +0 -1
  31. package/dist/expressions/ast.test.d.ts +0 -1
  32. package/dist/expressions/ast.test.js +0 -147
  33. package/dist/expressions/ast.test.js.map +0 -1
  34. package/dist/expressions/ast_factory.test.d.ts +0 -1
  35. package/dist/expressions/ast_factory.test.js +0 -94
  36. package/dist/expressions/ast_factory.test.js.map +0 -1
  37. package/dist/expressions/constants.test.d.ts +0 -1
  38. package/dist/expressions/constants.test.js +0 -84
  39. package/dist/expressions/constants.test.js.map +0 -1
  40. package/dist/expressions/eval.test.d.ts +0 -1
  41. package/dist/expressions/eval.test.js +0 -215
  42. package/dist/expressions/eval.test.js.map +0 -1
  43. package/dist/expressions/expressions.test.d.ts +0 -6
  44. package/dist/expressions/expressions.test.js +0 -7
  45. package/dist/expressions/expressions.test.js.map +0 -1
  46. package/dist/expressions/parser.test.d.ts +0 -1
  47. package/dist/expressions/parser.test.js +0 -174
  48. package/dist/expressions/parser.test.js.map +0 -1
  49. package/dist/expressions/tokenizer.test.d.ts +0 -1
  50. package/dist/expressions/tokenizer.test.js +0 -124
  51. package/dist/expressions/tokenizer.test.js.map +0 -1
  52. package/dist/interfaces-DhL-_vL-.d.ts +0 -423
  53. package/dist/mancha.js.map +0 -1
  54. package/dist/renderer-1jqgJa7K.js +0 -43
  55. package/dist/safe_browser.d.ts +0 -16
  56. package/dist/safe_browser.js +0 -1
  57. package/dist/safe_browser.js.map +0 -1
  58. package/dist/test_types/api.d.ts +0 -11
  59. package/dist/test_types/api.js +0 -3
  60. package/dist/test_types/api.js.map +0 -1
  61. package/dist/test_types/nested/child.d.ts +0 -12
  62. package/dist/test_types/nested/child.js +0 -2
  63. package/dist/test_types/nested/child.js.map +0 -1
  64. package/dist/test_types/product.d.ts +0 -11
  65. package/dist/test_types/product.js +0 -3
  66. package/dist/test_types/product.js.map +0 -1
  67. package/dist/test_types/user.d.ts +0 -10
  68. package/dist/test_types/user.js +0 -3
  69. package/dist/test_types/user.js.map +0 -1
  70. package/dist/test_utils.d.ts +0 -20
  71. package/dist/test_utils.js +0 -94
  72. package/dist/test_utils.js.map +0 -1
  73. package/global.d.ts +0 -4
  74. package/gulpfile.ts +0 -47
  75. package/scripts/generate-css-docs.ts +0 -582
  76. package/tsconfig.json +0 -37
  77. package/tsdown.config.ts +0 -32
  78. package/tsec_exemptions.json +0 -9
package/docs/05_css.md CHANGED
@@ -14,24 +14,47 @@ The minimal CSS rules provide a clean, readable default style for standard HTML
14
14
  - **H1-H6 Margin**: 1em 0 0.5em
15
15
  - **P, UL, OL Margin Bottom**: 1em
16
16
 
17
- ## Basic CSS
17
+ ## CSS Reset
18
18
 
19
- The basic CSS rules provide a more comprehensive reset and set of defaults, widely based on Tailwind CSS Preflight. You can inject them using `injectCss(["basic"])` or by adding `css="basic"` to your script tag.
19
+ The reset provides a comprehensive set of defaults, widely based on Tailwind CSS Preflight. It ships with the utility classes: adding `css="utils"` to your script tag, or calling `injectCss(["utils"])`, injects both.
20
20
 
21
21
  ### Key Features
22
- - **Box Sizing**: `border-box` globally
23
22
  - **Typography**: Default sans-serif font stack, consistent line-height
24
- - **Form Elements**: Inherit font styles, transparent backgrounds, `cursor: pointer` for buttons
25
- - **Media**: Images/videos max-width 100%
23
+ - **Form Elements**: Inherit font styles and color from their container, with margin and padding zeroed; buttons also get a transparent background and `cursor: pointer`
26
24
  - **Dialog**: Default backdrop styling
27
25
  - **Resets**: Removes default margins/paddings from most block elements
28
26
 
27
+ ### Layout Effects
28
+
29
+ The reset applies to **all of your markup**, not only to elements carrying utility classes, so plain HTML lays out differently once it is injected. The rules with layout, rather than merely typographic, consequences are:
30
+
31
+ - `img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}` — media is no longer inline. `text-align:center` on a parent stops centering it, the inline baseline gap below images disappears, and images no longer flow alongside adjacent text.
32
+ - `img,video{max-width:100%;height:auto}` — media never overflows its container. `height:auto` also overrides the HTML `height` attribute, so `<img width="300" height="100">` renders at the file's own aspect ratio instead of the requested one. Inside a flex row the same clamp lets an image shrink below its intrinsic size.
33
+ - `*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}` — padding and border no longer add to an element's width. Default borders are also stripped, including those set through presentational HTML attributes, so `fieldset`, `iframe`, `img`, and `table` render without one until a border utility is applied. `hr` is the exception: the reset gives it back a 1px top border so horizontal rules stay visible.
34
+ - `body{margin:0;…}` and `blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}` — the page loses its default gutter and headings, paragraphs, and other blocks no longer space themselves apart, so plain prose collapses into a single run of text until spacing utilities are applied.
35
+ - `ol,ul,menu{list-style:none;margin:0;padding:0}` — bullets, numbers, and list indentation are gone; restore them with the `list-*` and padding utilities.
36
+ - `button,input,optgroup,select,textarea{…;margin:0;padding:0}` — form controls lose their native margin and padding on top of inheriting the surrounding font and color, so inputs and text areas render flush against their content and need padding utilities to look clickable.
37
+ - `button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;background-color:transparent;background-image:none;cursor:pointer}` — buttons lose their native chrome entirely and must be styled explicitly.
38
+ - `:disabled{cursor:default;pointer-events:none;opacity:0.75}` — beyond dimming, `pointer-events:none` is a behavioral change: disabled controls stop receiving hover, tooltip, and click handling. Tailwind Preflight only sets `cursor:default` here; the `pointer-events` and `opacity` declarations are mancha additions.
39
+
40
+ Opt out per element with utilities, e.g. to stop a flex item from being shrunk by its siblings. The class belongs on the flex item itself — on a nested image it does nothing, because only direct children of the flex container are flex items:
41
+
42
+ ```html
43
+ <div class="flex">
44
+ <div class="flex-none">
45
+ <img src="logo.svg" />
46
+ </div>
47
+ </div>
48
+ ```
49
+
50
+ The wrapper then keeps its content width, so the image is not shrunk. `flex-none` on the image itself is not enough even when the image is the direct flex child, because `max-width:100%` clamps it regardless of how flex sizes it. That clamp applies everywhere, not just in flex rows: an image in a container narrower than itself is scaled down to fit. Undo it with the arbitrary value `max-w-[none]` — there is no `max-w-none` utility.
51
+
29
52
  ## Utility CSS
30
53
 
31
54
  The utility CSS rules are inspired by Tailwind CSS. You can inject them using `injectCss(["utils"])` or by adding `css="utils"` to your script tag.
32
55
 
33
56
  This automatically includes:
34
- - **CSS Reset** (Tailwind Preflight): box-sizing, typography, form resets, media defaults
57
+ - **CSS Reset**: box-sizing, typography, form and media defaults applied to all of your markup — see [CSS Reset](#css-reset), in particular the layout effects on images, lists, and form controls
35
58
  - **Base utility classes**: spacing, sizing, colors, layout, typography, and more
36
59
  - **On-demand scanning**: responsive variants, orientation variants, pseudo-state variants, color opacity, custom bracket values, and dark mode are generated on-the-fly for only the classes actually used in your markup
37
60
 
@@ -156,19 +179,19 @@ You can also control the opacity of any color utility by appending `/{opacity}`
156
179
 
157
180
  | Utility | Description |
158
181
  | --- | --- |
159
- | `border` | `{"border":"1px solid"}` |
160
- | `border-none` | `{"border":"none"}` |
161
- | `border-solid` | `{"border-style":"solid"}` |
162
- | `border-dashed` | `{"border-style":"dashed"}` |
163
- | `border-dotted` | `{"border-style":"dotted"}` |
164
- | `border-collapse` | `{"border-collapse":"collapse"}` |
165
- | `rounded-none` | `{"border-radius":"0"}` |
166
- | `rounded` | `{"border-radius":".25rem"}` |
167
- | `rounded-sm` | `{"border-radius":".125rem"}` |
168
- | `rounded-md` | `{"border-radius":".375rem"}` |
169
- | `rounded-lg` | `{"border-radius":".5rem"}` |
170
- | `rounded-xl` | `{"border-radius":".75rem"}` |
171
- | `rounded-full` | `{"border-radius":"9999px"}` |
182
+ | `border` | `border: 1px solid` |
183
+ | `border-none` | `border: none` |
184
+ | `border-solid` | `border-style: solid` |
185
+ | `border-dashed` | `border-style: dashed` |
186
+ | `border-dotted` | `border-style: dotted` |
187
+ | `border-collapse` | `border-collapse: collapse` |
188
+ | `rounded-none` | `border-radius: 0` |
189
+ | `rounded` | `border-radius: .25rem` |
190
+ | `rounded-sm` | `border-radius: .125rem` |
191
+ | `rounded-md` | `border-radius: .375rem` |
192
+ | `rounded-lg` | `border-radius: .5rem` |
193
+ | `rounded-xl` | `border-radius: .75rem` |
194
+ | `rounded-full` | `border-radius: 9999px` |
172
195
  | `border-{0-15}` | Border width in pixels (e.g., `border-0`, `border-1`, ..., `border-15`) |
173
196
  | `border-x-{0-15}` | Horizontal border width in pixels |
174
197
  | `border-y-{0-15}` | Vertical border width in pixels |
@@ -178,23 +201,23 @@ You can also control the opacity of any color utility by appending `/{opacity}`
178
201
 
179
202
  | Utility | Description |
180
203
  | --- | --- |
181
- | `shadow-2xs` | `{"box-shadow":"0 1px rgb(0 0 0 / 0.05)"}` |
182
- | `shadow-xs` | `{"box-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)"}` |
183
- | `shadow` | `{"box-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"}` |
184
- | `shadow-sm` | `{"box-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"}` |
185
- | `shadow-md` | `{"box-shadow":"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}` |
186
- | `shadow-lg` | `{"box-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"}` |
187
- | `shadow-xl` | `{"box-shadow":"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"}` |
188
- | `shadow-2xl` | `{"box-shadow":"0 25px 50px -12px rgb(0 0 0 / 0.25)"}` |
189
- | `shadow-inner` | `{"box-shadow":"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"}` |
190
- | `shadow-none` | `{"box-shadow":"0 0 #0000"}` |
191
- | `ring` | `{"box-shadow":"var(--ring-inset, ) 0 0 0 3px rgb(59 130 246 / 0.5)"}` |
192
- | `ring-0` | `{"box-shadow":"var(--ring-inset, ) 0 0 0 0px rgb(59 130 246 / 0.5)"}` |
193
- | `ring-1` | `{"box-shadow":"var(--ring-inset, ) 0 0 0 1px rgb(59 130 246 / 0.5)"}` |
194
- | `ring-2` | `{"box-shadow":"var(--ring-inset, ) 0 0 0 2px rgb(59 130 246 / 0.5)"}` |
195
- | `ring-4` | `{"box-shadow":"var(--ring-inset, ) 0 0 0 4px rgb(59 130 246 / 0.5)"}` |
196
- | `ring-8` | `{"box-shadow":"var(--ring-inset, ) 0 0 0 8px rgb(59 130 246 / 0.5)"}` |
197
- | `ring-inset` | `{"--ring-inset":"inset"}` |
204
+ | `shadow-2xs` | `box-shadow: 0 1px rgb(0 0 0 / 0.05)` |
205
+ | `shadow-xs` | `box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05)` |
206
+ | `shadow` | `box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)` |
207
+ | `shadow-sm` | `box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)` |
208
+ | `shadow-md` | `box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)` |
209
+ | `shadow-lg` | `box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
210
+ | `shadow-xl` | `box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)` |
211
+ | `shadow-2xl` | `box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25)` |
212
+ | `shadow-inner` | `box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05)` |
213
+ | `shadow-none` | `box-shadow: 0 0 #0000` |
214
+ | `ring` | `box-shadow: var(--ring-inset, ) 0 0 0 3px rgb(59 130 246 / 0.5)` |
215
+ | `ring-0` | `box-shadow: var(--ring-inset, ) 0 0 0 0px rgb(59 130 246 / 0.5)` |
216
+ | `ring-1` | `box-shadow: var(--ring-inset, ) 0 0 0 1px rgb(59 130 246 / 0.5)` |
217
+ | `ring-2` | `box-shadow: var(--ring-inset, ) 0 0 0 2px rgb(59 130 246 / 0.5)` |
218
+ | `ring-4` | `box-shadow: var(--ring-inset, ) 0 0 0 4px rgb(59 130 246 / 0.5)` |
219
+ | `ring-8` | `box-shadow: var(--ring-inset, ) 0 0 0 8px rgb(59 130 246 / 0.5)` |
220
+ | `ring-inset` | `--ring-inset: inset` |
198
221
  | `opacity-0` | Fully transparent |
199
222
  | `opacity-{5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100}` | Opacity values (multiples of 5) |
200
223
 
@@ -202,191 +225,191 @@ You can also control the opacity of any color utility by appending `/{opacity}`
202
225
 
203
226
  | Utility | Description |
204
227
  | --- | --- |
205
- | `outline` | `{"outline-style":"solid"}` |
206
- | `outline-none` | `{"outline":"2px solid transparent","outline-offset":"2px"}` |
207
- | `outline-dashed` | `{"outline-style":"dashed"}` |
208
- | `outline-dotted` | `{"outline-style":"dotted"}` |
209
- | `outline-double` | `{"outline-style":"double"}` |
210
- | `outline-0` | `{"outline-width":"0px"}` |
211
- | `outline-1` | `{"outline-width":"1px"}` |
212
- | `outline-2` | `{"outline-width":"2px"}` |
213
- | `outline-4` | `{"outline-width":"4px"}` |
214
- | `outline-8` | `{"outline-width":"8px"}` |
215
- | `outline-offset-0` | `{"outline-offset":"0px"}` |
216
- | `outline-offset-1` | `{"outline-offset":"1px"}` |
217
- | `outline-offset-2` | `{"outline-offset":"2px"}` |
218
- | `outline-offset-4` | `{"outline-offset":"4px"}` |
219
- | `outline-offset-8` | `{"outline-offset":"8px"}` |
228
+ | `outline` | `outline-style: solid` |
229
+ | `outline-none` | `outline: 2px solid transparent; outline-offset: 2px` |
230
+ | `outline-dashed` | `outline-style: dashed` |
231
+ | `outline-dotted` | `outline-style: dotted` |
232
+ | `outline-double` | `outline-style: double` |
233
+ | `outline-0` | `outline-width: 0px` |
234
+ | `outline-1` | `outline-width: 1px` |
235
+ | `outline-2` | `outline-width: 2px` |
236
+ | `outline-4` | `outline-width: 4px` |
237
+ | `outline-8` | `outline-width: 8px` |
238
+ | `outline-offset-0` | `outline-offset: 0px` |
239
+ | `outline-offset-1` | `outline-offset: 1px` |
240
+ | `outline-offset-2` | `outline-offset: 2px` |
241
+ | `outline-offset-4` | `outline-offset: 4px` |
242
+ | `outline-offset-8` | `outline-offset: 8px` |
220
243
 
221
244
  ### Aspect Ratio
222
245
 
223
246
  | Utility | Description |
224
247
  | --- | --- |
225
- | `aspect-auto` | `{"aspect-ratio":"auto"}` |
226
- | `aspect-square` | `{"aspect-ratio":"1 / 1"}` |
227
- | `aspect-video` | `{"aspect-ratio":"16 / 9"}` |
248
+ | `aspect-auto` | `aspect-ratio: auto` |
249
+ | `aspect-square` | `aspect-ratio: 1 / 1` |
250
+ | `aspect-video` | `aspect-ratio: 16 / 9` |
228
251
 
229
252
  ### Backdrop Filters
230
253
 
231
254
  | Utility | Description |
232
255
  | --- | --- |
233
- | `backdrop-blur-none` | `{"backdrop-filter":"blur(0)"}` |
234
- | `backdrop-blur-sm` | `{"backdrop-filter":"blur(4px)"}` |
235
- | `backdrop-blur` | `{"backdrop-filter":"blur(8px)"}` |
236
- | `backdrop-blur-md` | `{"backdrop-filter":"blur(12px)"}` |
237
- | `backdrop-blur-lg` | `{"backdrop-filter":"blur(16px)"}` |
238
- | `backdrop-blur-xl` | `{"backdrop-filter":"blur(24px)"}` |
239
- | `backdrop-blur-2xl` | `{"backdrop-filter":"blur(40px)"}` |
240
- | `backdrop-blur-3xl` | `{"backdrop-filter":"blur(64px)"}` |
256
+ | `backdrop-blur-none` | `backdrop-filter: blur(0)` |
257
+ | `backdrop-blur-sm` | `backdrop-filter: blur(4px)` |
258
+ | `backdrop-blur` | `backdrop-filter: blur(8px)` |
259
+ | `backdrop-blur-md` | `backdrop-filter: blur(12px)` |
260
+ | `backdrop-blur-lg` | `backdrop-filter: blur(16px)` |
261
+ | `backdrop-blur-xl` | `backdrop-filter: blur(24px)` |
262
+ | `backdrop-blur-2xl` | `backdrop-filter: blur(40px)` |
263
+ | `backdrop-blur-3xl` | `backdrop-filter: blur(64px)` |
241
264
 
242
265
  ### Transitions & Animations
243
266
 
244
267
  | Utility | Description |
245
268
  | --- | --- |
246
- | `transition-none` | `{"transition":"none"}` |
247
- | `transition` | `{"transition-property":"all","transition-timing-function":"ease-in-out","transition-duration":"var(--transition-duration, 150ms)"}` |
248
- | `transition-all` | `{"transition-property":"all","transition-timing-function":"ease-in-out","transition-duration":"var(--transition-duration, 150ms)"}` |
249
- | `transition-opacity` | `{"transition-property":"opacity","transition-timing-function":"ease-in-out","transition-duration":"var(--transition-duration, 150ms)"}` |
250
- | `transition-transform` | `{"transition-property":"transform","transition-timing-function":"ease-in-out","transition-duration":"var(--transition-duration, 150ms)"}` |
251
- | `transition-shadow` | `{"transition-property":"box-shadow","transition-timing-function":"ease-in-out","transition-duration":"var(--transition-duration, 150ms)"}` |
252
- | `transition-colors` | `{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease-in-out","transition-duration":"var(--transition-duration, 150ms)"}` |
253
- | `animate-none` | `{"animation":"none"}` |
254
- | `animate-spin` | `{"animation":"spin 1s linear infinite"}` |
255
- | `animate-ping` | `{"animation":"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite"}` |
256
- | `animate-pulse` | `{"animation":"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"}` |
269
+ | `transition-none` | `transition: none` |
270
+ | `transition` | `transition-property: all; transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)` |
271
+ | `transition-all` | `transition-property: all; transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)` |
272
+ | `transition-opacity` | `transition-property: opacity; transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)` |
273
+ | `transition-transform` | `transition-property: transform; transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)` |
274
+ | `transition-shadow` | `transition-property: box-shadow; transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)` |
275
+ | `transition-colors` | `transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)` |
276
+ | `animate-none` | `animation: none` |
277
+ | `animate-spin` | `animation: spin 1s linear infinite` |
278
+ | `animate-ping` | `animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite` |
279
+ | `animate-pulse` | `animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite` |
257
280
  | `duration-{25,50,75,100,150,200,300,500,700,1000}` | Transition duration in milliseconds |
258
281
 
259
282
  ### Interactivity
260
283
 
261
284
  | Utility | Description |
262
285
  | --- | --- |
263
- | `cursor-pointer` | `{"cursor":"pointer"}` |
264
- | `cursor-wait` | `{"cursor":"wait"}` |
265
- | `cursor-not-allowed` | `{"cursor":"not-allowed"}` |
266
- | `select-none` | `{"user-select":"none"}` |
267
- | `select-all` | `{"user-select":"all"}` |
268
- | `pointer-events-auto` | `{"pointer-events":"auto"}` |
269
- | `pointer-events-none` | `{"pointer-events":"none"}` |
270
- | `resize` | `{"resize":"both"}` |
271
- | `resize-x` | `{"resize":"horizontal"}` |
272
- | `resize-y` | `{"resize":"vertical"}` |
273
- | `resize-none` | `{"resize":"none"}` |
286
+ | `cursor-pointer` | `cursor: pointer` |
287
+ | `cursor-wait` | `cursor: wait` |
288
+ | `cursor-not-allowed` | `cursor: not-allowed` |
289
+ | `select-none` | `user-select: none` |
290
+ | `select-all` | `user-select: all` |
291
+ | `pointer-events-auto` | `pointer-events: auto` |
292
+ | `pointer-events-none` | `pointer-events: none` |
293
+ | `resize` | `resize: both` |
294
+ | `resize-x` | `resize: horizontal` |
295
+ | `resize-y` | `resize: vertical` |
296
+ | `resize-none` | `resize: none` |
274
297
 
275
298
  ### Typography
276
299
 
277
300
  | Utility | Description |
278
301
  | --- | --- |
279
- | `font-mono` | `{"font-family":"monospace"}` |
280
- | `font-sans` | `{"font-family":"sans-serif"}` |
281
- | `font-serif` | `{"font-family":"serif"}` |
282
- | `font-cursive` | `{"font-family":"cursive"}` |
283
- | `text-xs` | `{"font-size":".75rem","line-height":"calc(1 / 0.75)"}` |
284
- | `text-sm` | `{"font-size":".875rem","line-height":"calc(1.25 / 0.875)"}` |
285
- | `text-base` | `{"font-size":"1rem","line-height":"calc(1.5 / 1)"}` |
286
- | `text-lg` | `{"font-size":"1.125rem","line-height":"calc(1.75 / 1.125)"}` |
287
- | `text-xl` | `{"font-size":"1.25rem","line-height":"calc(1.75 / 1.25)"}` |
288
- | `text-2xl` | `{"font-size":"1.5rem","line-height":"calc(2 / 1.5)"}` |
289
- | `text-3xl` | `{"font-size":"1.875rem","line-height":"calc(2.25 / 1.875)"}` |
290
- | `text-4xl` | `{"font-size":"2.25rem","line-height":"calc(2.5 / 2.25)"}` |
291
- | `text-5xl` | `{"font-size":"3rem","line-height":"1"}` |
292
- | `text-6xl` | `{"font-size":"3.75rem","line-height":"1"}` |
293
- | `text-7xl` | `{"font-size":"4.5rem","line-height":"1"}` |
294
- | `font-thin` | `{"font-weight":100}` |
295
- | `font-extralight` | `{"font-weight":200}` |
296
- | `font-light` | `{"font-weight":300}` |
297
- | `font-normal` | `{"font-weight":400}` |
298
- | `font-medium` | `{"font-weight":500}` |
299
- | `font-semibold` | `{"font-weight":600}` |
300
- | `font-bold` | `{"font-weight":700}` |
301
- | `font-extrabold` | `{"font-weight":800}` |
302
- | `font-black` | `{"font-weight":900}` |
303
- | `italic` | `{"font-style":"italic"}` |
304
- | `not-italic` | `{"font-style":"normal"}` |
305
- | `tracking-tighter` | `{"letter-spacing":"-0.05em"}` |
306
- | `tracking-tight` | `{"letter-spacing":"-0.025em"}` |
307
- | `tracking-normal` | `{"letter-spacing":"0"}` |
308
- | `tracking-wide` | `{"letter-spacing":"0.025em"}` |
309
- | `tracking-wider` | `{"letter-spacing":"0.05em"}` |
310
- | `tracking-widest` | `{"letter-spacing":"0.1em"}` |
311
- | `leading-none` | `{"line-height":"1"}` |
312
- | `leading-tight` | `{"line-height":"1.25"}` |
313
- | `leading-snug` | `{"line-height":"1.375"}` |
314
- | `leading-normal` | `{"line-height":"1.5"}` |
315
- | `leading-relaxed` | `{"line-height":"1.625"}` |
316
- | `leading-loose` | `{"line-height":"2"}` |
317
- | `text-left` | `{"text-align":"left"}` |
318
- | `text-right` | `{"text-align":"right"}` |
319
- | `text-center` | `{"text-align":"center"}` |
320
- | `text-justify` | `{"text-align":"justify"}` |
321
- | `underline` | `{"text-decoration":"underline"}` |
322
- | `decoration-none` | `{"text-decoration":"none"}` |
323
- | `line-through` | `{"text-decoration":"line-through"}` |
324
- | `uppercase` | `{"text-transform":"uppercase"}` |
325
- | `lowercase` | `{"text-transform":"lowercase"}` |
326
- | `capitalize` | `{"text-transform":"capitalize"}` |
327
- | `truncate` | `{"white-space":"nowrap","overflow":"hidden","text-overflow":"ellipsis"}` |
328
- | `text-elipsis` | `{"text-overflow":"ellipsis"}` |
329
- | `text-clip` | `{"text-overflow":"clip"}` |
330
- | `text-wrap` | `{"text-wrap":"wrap"}` |
331
- | `text-nowrap` | `{"text-wrap":"nowrap"}` |
332
- | `text-balance` | `{"text-wrap":"balance"}` |
333
- | `text-pretty` | `{"text-wrap":"pretty"}` |
334
- | `whitespace-normal` | `{"white-space":"normal"}` |
335
- | `whitespace-nowrap` | `{"white-space":"nowrap"}` |
336
- | `whitespace-pre` | `{"white-space":"pre"}` |
337
- | `whitespace-pre-line` | `{"white-space":"pre-line"}` |
338
- | `whitespace-pre-wrap` | `{"white-space":"pre-wrap"}` |
339
- | `whitespace-break-spaces` | `{"white-space":"break-spaces"}` |
302
+ | `font-mono` | `font-family: monospace` |
303
+ | `font-sans` | `font-family: sans-serif` |
304
+ | `font-serif` | `font-family: serif` |
305
+ | `font-cursive` | `font-family: cursive` |
306
+ | `text-xs` | `font-size: .75rem; line-height: calc(1 / 0.75)` |
307
+ | `text-sm` | `font-size: .875rem; line-height: calc(1.25 / 0.875)` |
308
+ | `text-base` | `font-size: 1rem; line-height: calc(1.5 / 1)` |
309
+ | `text-lg` | `font-size: 1.125rem; line-height: calc(1.75 / 1.125)` |
310
+ | `text-xl` | `font-size: 1.25rem; line-height: calc(1.75 / 1.25)` |
311
+ | `text-2xl` | `font-size: 1.5rem; line-height: calc(2 / 1.5)` |
312
+ | `text-3xl` | `font-size: 1.875rem; line-height: calc(2.25 / 1.875)` |
313
+ | `text-4xl` | `font-size: 2.25rem; line-height: calc(2.5 / 2.25)` |
314
+ | `text-5xl` | `font-size: 3rem; line-height: 1` |
315
+ | `text-6xl` | `font-size: 3.75rem; line-height: 1` |
316
+ | `text-7xl` | `font-size: 4.5rem; line-height: 1` |
317
+ | `font-thin` | `font-weight: 100` |
318
+ | `font-extralight` | `font-weight: 200` |
319
+ | `font-light` | `font-weight: 300` |
320
+ | `font-normal` | `font-weight: 400` |
321
+ | `font-medium` | `font-weight: 500` |
322
+ | `font-semibold` | `font-weight: 600` |
323
+ | `font-bold` | `font-weight: 700` |
324
+ | `font-extrabold` | `font-weight: 800` |
325
+ | `font-black` | `font-weight: 900` |
326
+ | `italic` | `font-style: italic` |
327
+ | `not-italic` | `font-style: normal` |
328
+ | `tracking-tighter` | `letter-spacing: -0.05em` |
329
+ | `tracking-tight` | `letter-spacing: -0.025em` |
330
+ | `tracking-normal` | `letter-spacing: 0` |
331
+ | `tracking-wide` | `letter-spacing: 0.025em` |
332
+ | `tracking-wider` | `letter-spacing: 0.05em` |
333
+ | `tracking-widest` | `letter-spacing: 0.1em` |
334
+ | `leading-none` | `line-height: 1` |
335
+ | `leading-tight` | `line-height: 1.25` |
336
+ | `leading-snug` | `line-height: 1.375` |
337
+ | `leading-normal` | `line-height: 1.5` |
338
+ | `leading-relaxed` | `line-height: 1.625` |
339
+ | `leading-loose` | `line-height: 2` |
340
+ | `text-left` | `text-align: left` |
341
+ | `text-right` | `text-align: right` |
342
+ | `text-center` | `text-align: center` |
343
+ | `text-justify` | `text-align: justify` |
344
+ | `underline` | `text-decoration: underline` |
345
+ | `decoration-none` | `text-decoration: none` |
346
+ | `line-through` | `text-decoration: line-through` |
347
+ | `uppercase` | `text-transform: uppercase` |
348
+ | `lowercase` | `text-transform: lowercase` |
349
+ | `capitalize` | `text-transform: capitalize` |
350
+ | `truncate` | `white-space: nowrap; overflow: hidden; text-overflow: ellipsis` |
351
+ | `text-elipsis` | `text-overflow: ellipsis` |
352
+ | `text-clip` | `text-overflow: clip` |
353
+ | `text-wrap` | `text-wrap: wrap` |
354
+ | `text-nowrap` | `text-wrap: nowrap` |
355
+ | `text-balance` | `text-wrap: balance` |
356
+ | `text-pretty` | `text-wrap: pretty` |
357
+ | `whitespace-normal` | `white-space: normal` |
358
+ | `whitespace-nowrap` | `white-space: nowrap` |
359
+ | `whitespace-pre` | `white-space: pre` |
360
+ | `whitespace-pre-line` | `white-space: pre-line` |
361
+ | `whitespace-pre-wrap` | `white-space: pre-wrap` |
362
+ | `whitespace-break-spaces` | `white-space: break-spaces` |
340
363
 
341
364
  ### Flexbox & Layout
342
365
 
343
366
  | Utility | Description |
344
367
  | --- | --- |
345
- | `flex` | `{"display":"flex"}` |
346
- | `flex-1` | `{"flex":"1 1 0%"}` |
347
- | `flex-inline` | `{"display":"inline-flex"}` |
348
- | `flex-row` | `{"flex-direction":"row"}` |
349
- | `flex-col` | `{"flex-direction":"column"}` |
350
- | `flex-row-reverse` | `{"flex-direction":"row-reverse"}` |
351
- | `flex-col-reverse` | `{"flex-direction":"column-reverse"}` |
352
- | `flex-wrap` | `{"flex-wrap":"wrap"}` |
353
- | `flex-wrap-reverse` | `{"flex-wrap":"wrap-reverse"}` |
354
- | `flex-nowrap` | `{"flex-wrap":"nowrap"}` |
355
- | `justify-start` | `{"justify-content":"flex-start"}` |
356
- | `justify-end` | `{"justify-content":"flex-end"}` |
357
- | `justify-center` | `{"justify-content":"center"}` |
358
- | `justify-between` | `{"justify-content":"space-between"}` |
359
- | `justify-around` | `{"justify-content":"space-around"}` |
360
- | `justify-evenly` | `{"justify-content":"space-evenly"}` |
361
- | `justify-stretch` | `{"justify-content":"stretch"}` |
362
- | `items-start` | `{"align-items":"flex-start"}` |
363
- | `items-end` | `{"align-items":"flex-end"}` |
364
- | `items-center` | `{"align-items":"center"}` |
365
- | `items-stretch` | `{"align-items":"stretch"}` |
366
- | `flex-grow` | `{"flex-grow":1}` |
367
- | `flex-shrink` | `{"flex-shrink":1}` |
368
- | `flex-none` | `{"flex":"none"}` |
369
- | `flex-auto` | `{"flex":"1 1 auto"}` |
370
- | `flex-initial` | `{"flex":"0 1 auto"}` |
371
- | `grow` | `{"flex-grow":"1"}` |
372
- | `grow-0` | `{"flex-grow":"0"}` |
373
- | `shrink` | `{"flex-shrink":"1"}` |
374
- | `shrink-0` | `{"flex-shrink":"0"}` |
375
- | `self-auto` | `{"align-self":"auto"}` |
376
- | `self-start` | `{"align-self":"flex-start"}` |
377
- | `self-end` | `{"align-self":"flex-end"}` |
378
- | `self-center` | `{"align-self":"center"}` |
379
- | `self-stretch` | `{"align-self":"stretch"}` |
380
- | `self-baseline` | `{"align-self":"baseline"}` |
381
- | `content-normal` | `{"align-content":"normal"}` |
382
- | `content-start` | `{"align-content":"flex-start"}` |
383
- | `content-end` | `{"align-content":"flex-end"}` |
384
- | `content-center` | `{"align-content":"center"}` |
385
- | `content-between` | `{"align-content":"space-between"}` |
386
- | `content-around` | `{"align-content":"space-around"}` |
387
- | `content-evenly` | `{"align-content":"space-evenly"}` |
388
- | `content-stretch` | `{"align-content":"stretch"}` |
389
- | `items-baseline` | `{"align-items":"baseline"}` |
368
+ | `flex` | `display: flex` |
369
+ | `flex-1` | `flex: 1 1 0%` |
370
+ | `flex-inline` | `display: inline-flex` |
371
+ | `flex-row` | `flex-direction: row` |
372
+ | `flex-col` | `flex-direction: column` |
373
+ | `flex-row-reverse` | `flex-direction: row-reverse` |
374
+ | `flex-col-reverse` | `flex-direction: column-reverse` |
375
+ | `flex-wrap` | `flex-wrap: wrap` |
376
+ | `flex-wrap-reverse` | `flex-wrap: wrap-reverse` |
377
+ | `flex-nowrap` | `flex-wrap: nowrap` |
378
+ | `justify-start` | `justify-content: flex-start` |
379
+ | `justify-end` | `justify-content: flex-end` |
380
+ | `justify-center` | `justify-content: center` |
381
+ | `justify-between` | `justify-content: space-between` |
382
+ | `justify-around` | `justify-content: space-around` |
383
+ | `justify-evenly` | `justify-content: space-evenly` |
384
+ | `justify-stretch` | `justify-content: stretch` |
385
+ | `items-start` | `align-items: flex-start` |
386
+ | `items-end` | `align-items: flex-end` |
387
+ | `items-center` | `align-items: center` |
388
+ | `items-stretch` | `align-items: stretch` |
389
+ | `flex-grow` | `flex-grow: 1` |
390
+ | `flex-shrink` | `flex-shrink: 1` |
391
+ | `flex-none` | `flex: none` |
392
+ | `flex-auto` | `flex: 1 1 auto` |
393
+ | `flex-initial` | `flex: 0 1 auto` |
394
+ | `grow` | `flex-grow: 1` |
395
+ | `grow-0` | `flex-grow: 0` |
396
+ | `shrink` | `flex-shrink: 1` |
397
+ | `shrink-0` | `flex-shrink: 0` |
398
+ | `self-auto` | `align-self: auto` |
399
+ | `self-start` | `align-self: flex-start` |
400
+ | `self-end` | `align-self: flex-end` |
401
+ | `self-center` | `align-self: center` |
402
+ | `self-stretch` | `align-self: stretch` |
403
+ | `self-baseline` | `align-self: baseline` |
404
+ | `content-normal` | `align-content: normal` |
405
+ | `content-start` | `align-content: flex-start` |
406
+ | `content-end` | `align-content: flex-end` |
407
+ | `content-center` | `align-content: center` |
408
+ | `content-between` | `align-content: space-between` |
409
+ | `content-around` | `align-content: space-around` |
410
+ | `content-evenly` | `align-content: space-evenly` |
411
+ | `content-stretch` | `align-content: stretch` |
412
+ | `items-baseline` | `align-items: baseline` |
390
413
  | `gap-0` | No gap |
391
414
  | `gap-{1-512}` | Gap in rem units (0.25rem increments) |
392
415
  | `gap-{1-512}px` | Gap in pixels |
@@ -411,7 +434,7 @@ You can also control the opacity of any color utility by appending `/{opacity}`
411
434
 
412
435
  | Utility | Description |
413
436
  | --- | --- |
414
- | `grid` | `{"display":"grid"}` |
437
+ | `grid` | `display: grid` |
415
438
  | `grid-cols-{1-12}` | `grid-template-columns: repeat(n, minmax(0, 1fr))` |
416
439
  | `grid-cols-none` | `grid-template-columns: none` |
417
440
  | `col-span-{1-12}` | `grid-column: span n / span n` |
@@ -431,20 +454,20 @@ You can also control the opacity of any color utility by appending `/{opacity}`
431
454
 
432
455
  | Utility | Description |
433
456
  | --- | --- |
434
- | `relative` | `{"position":"relative"}` |
435
- | `fixed` | `{"position":"fixed"}` |
436
- | `absolute` | `{"position":"absolute"}` |
437
- | `sticky` | `{"position":"sticky"}` |
438
- | `object-contain` | `{"object-fit":"contain"}` |
439
- | `object-cover` | `{"object-fit":"cover"}` |
440
- | `object-fill` | `{"object-fit":"fill"}` |
441
- | `object-none` | `{"object-fit":"none"}` |
442
- | `inset-0` | `{"inset":"0"}` |
443
- | `inset-auto` | `{"inset":"auto"}` |
444
- | `inset-x-0` | `{"left":"0","right":"0"}` |
445
- | `inset-y-0` | `{"top":"0","bottom":"0"}` |
446
- | `inset-x-auto` | `{"left":"auto","right":"auto"}` |
447
- | `inset-y-auto` | `{"top":"auto","bottom":"auto"}` |
457
+ | `relative` | `position: relative` |
458
+ | `fixed` | `position: fixed` |
459
+ | `absolute` | `position: absolute` |
460
+ | `sticky` | `position: sticky` |
461
+ | `object-contain` | `object-fit: contain` |
462
+ | `object-cover` | `object-fit: cover` |
463
+ | `object-fill` | `object-fit: fill` |
464
+ | `object-none` | `object-fit: none` |
465
+ | `inset-0` | `inset: 0` |
466
+ | `inset-auto` | `inset: auto` |
467
+ | `inset-x-0` | `left: 0; right: 0` |
468
+ | `inset-y-0` | `top: 0; bottom: 0` |
469
+ | `inset-x-auto` | `left: auto; right: auto` |
470
+ | `inset-y-auto` | `top: auto; bottom: auto` |
448
471
  | `top-{0-512}`, `bottom-{0-512}`, `left-{0-512}`, `right-{0-512}` | Position in rem units (0.25rem increments) |
449
472
  | `top-{0-512}px`, `bottom-{0-512}px`, `left-{0-512}px`, `right-{0-512}px` | Position in pixels |
450
473
  | `top-{1-100}%`, `bottom-{1-100}%`, `left-{1-100}%`, `right-{1-100}%` | Position in percentages |
@@ -455,108 +478,108 @@ You can also control the opacity of any color utility by appending `/{opacity}`
455
478
 
456
479
  | Utility | Description |
457
480
  | --- | --- |
458
- | `block` | `{"display":"block"}` |
459
- | `contents` | `{"display":"contents"}` |
460
- | `hidden` | `{"display":"none"}` |
461
- | `inline` | `{"display":"inline"}` |
462
- | `visible` | `{"visibility":"visible"}` |
463
- | `invisible` | `{"visibility":"hidden"}` |
464
- | `collapse` | `{"visibility":"collapse"}` |
481
+ | `block` | `display: block` |
482
+ | `contents` | `display: contents` |
483
+ | `hidden` | `display: none` |
484
+ | `inline` | `display: inline` |
485
+ | `visible` | `visibility: visible` |
486
+ | `invisible` | `visibility: hidden` |
487
+ | `collapse` | `visibility: collapse` |
465
488
 
466
489
  ### Overflow & Scrolling
467
490
 
468
491
  | Utility | Description |
469
492
  | --- | --- |
470
- | `overflow-auto` | `{"overflow":"auto"}` |
471
- | `overflow-x-auto` | `{"overflow-x":"auto"}` |
472
- | `overflow-y-auto` | `{"overflow-y":"auto"}` |
473
- | `overflow-hidden` | `{"overflow":"hidden"}` |
474
- | `overflow-x-hidden` | `{"overflow-x":"hidden"}` |
475
- | `overflow-y-hidden` | `{"overflow-y":"hidden"}` |
476
- | `overflow-visible` | `{"overflow":"visible"}` |
477
- | `overscroll-auto` | `{"overscroll-behavior":"auto"}` |
478
- | `overscroll-contain` | `{"overscroll-behavior":"contain"}` |
479
- | `overscroll-none` | `{"overscroll-behavior":"none"}` |
480
- | `overscroll-x-auto` | `{"overscroll-behavior-x":"auto"}` |
481
- | `overscroll-x-contain` | `{"overscroll-behavior-x":"contain"}` |
482
- | `overscroll-x-none` | `{"overscroll-behavior-x":"none"}` |
483
- | `overscroll-y-auto` | `{"overscroll-behavior-y":"auto"}` |
484
- | `overscroll-y-contain` | `{"overscroll-behavior-y":"contain"}` |
485
- | `overscroll-y-none` | `{"overscroll-behavior-y":"none"}` |
493
+ | `overflow-auto` | `overflow: auto` |
494
+ | `overflow-x-auto` | `overflow-x: auto` |
495
+ | `overflow-y-auto` | `overflow-y: auto` |
496
+ | `overflow-hidden` | `overflow: hidden` |
497
+ | `overflow-x-hidden` | `overflow-x: hidden` |
498
+ | `overflow-y-hidden` | `overflow-y: hidden` |
499
+ | `overflow-visible` | `overflow: visible` |
500
+ | `overscroll-auto` | `overscroll-behavior: auto` |
501
+ | `overscroll-contain` | `overscroll-behavior: contain` |
502
+ | `overscroll-none` | `overscroll-behavior: none` |
503
+ | `overscroll-x-auto` | `overscroll-behavior-x: auto` |
504
+ | `overscroll-x-contain` | `overscroll-behavior-x: contain` |
505
+ | `overscroll-x-none` | `overscroll-behavior-x: none` |
506
+ | `overscroll-y-auto` | `overscroll-behavior-y: auto` |
507
+ | `overscroll-y-contain` | `overscroll-behavior-y: contain` |
508
+ | `overscroll-y-none` | `overscroll-behavior-y: none` |
486
509
 
487
510
  ### Backgrounds
488
511
 
489
512
  | Utility | Description |
490
513
  | --- | --- |
491
- | `bg-auto` | `{"background-size":"auto"}` |
492
- | `bg-cover` | `{"background-size":"cover"}` |
493
- | `bg-contain` | `{"background-size":"contain"}` |
494
- | `bg-center` | `{"background-position":"center"}` |
495
- | `bg-top` | `{"background-position":"top"}` |
496
- | `bg-bottom` | `{"background-position":"bottom"}` |
497
- | `bg-left` | `{"background-position":"left"}` |
498
- | `bg-right` | `{"background-position":"right"}` |
499
- | `bg-left-top` | `{"background-position":"left top"}` |
500
- | `bg-left-bottom` | `{"background-position":"left bottom"}` |
501
- | `bg-right-top` | `{"background-position":"right top"}` |
502
- | `bg-right-bottom` | `{"background-position":"right bottom"}` |
503
- | `bg-no-repeat` | `{"background-repeat":"no-repeat"}` |
504
- | `bg-fixed` | `{"background-attachment":"fixed"}` |
505
- | `bg-local` | `{"background-attachment":"local"}` |
506
- | `bg-scroll` | `{"background-attachment":"scroll"}` |
514
+ | `bg-auto` | `background-size: auto` |
515
+ | `bg-cover` | `background-size: cover` |
516
+ | `bg-contain` | `background-size: contain` |
517
+ | `bg-center` | `background-position: center` |
518
+ | `bg-top` | `background-position: top` |
519
+ | `bg-bottom` | `background-position: bottom` |
520
+ | `bg-left` | `background-position: left` |
521
+ | `bg-right` | `background-position: right` |
522
+ | `bg-left-top` | `background-position: left top` |
523
+ | `bg-left-bottom` | `background-position: left bottom` |
524
+ | `bg-right-top` | `background-position: right top` |
525
+ | `bg-right-bottom` | `background-position: right bottom` |
526
+ | `bg-no-repeat` | `background-repeat: no-repeat` |
527
+ | `bg-fixed` | `background-attachment: fixed` |
528
+ | `bg-local` | `background-attachment: local` |
529
+ | `bg-scroll` | `background-attachment: scroll` |
507
530
 
508
531
  ### Lists
509
532
 
510
533
  | Utility | Description |
511
534
  | --- | --- |
512
- | `list-none` | `{"list-style-type":"none"}` |
513
- | `list-disc` | `{"list-style-type":"disc"}` |
514
- | `list-decimal` | `{"list-style-type":"decimal"}` |
535
+ | `list-none` | `list-style-type: none` |
536
+ | `list-disc` | `list-style-type: disc` |
537
+ | `list-decimal` | `list-style-type: decimal` |
515
538
 
516
539
  ### Vertical Alignment
517
540
 
518
541
  | Utility | Description |
519
542
  | --- | --- |
520
- | `align-baseline` | `{"vertical-align":"baseline"}` |
521
- | `align-top` | `{"vertical-align":"top"}` |
522
- | `align-middle` | `{"vertical-align":"middle"}` |
523
- | `align-bottom` | `{"vertical-align":"bottom"}` |
524
- | `align-text-top` | `{"vertical-align":"text-top"}` |
525
- | `align-text-bottom` | `{"vertical-align":"text-bottom"}` |
543
+ | `align-baseline` | `vertical-align: baseline` |
544
+ | `align-top` | `vertical-align: top` |
545
+ | `align-middle` | `vertical-align: middle` |
546
+ | `align-bottom` | `vertical-align: bottom` |
547
+ | `align-text-top` | `vertical-align: text-top` |
548
+ | `align-text-bottom` | `vertical-align: text-bottom` |
526
549
 
527
550
  ### Viewport Sizing
528
551
 
529
552
  | Utility | Description |
530
553
  | --- | --- |
531
- | `min-h-screen` | `{"min-height":"100vh"}` |
532
- | `max-h-screen` | `{"max-height":"100vh"}` |
533
- | `min-w-screen` | `{"min-width":"100vw"}` |
534
- | `h-dvh` | `{"height":"100dvh"}` |
535
- | `h-svh` | `{"height":"100svh"}` |
536
- | `h-lvh` | `{"height":"100lvh"}` |
537
- | `w-dvw` | `{"width":"100dvw"}` |
538
- | `w-svw` | `{"width":"100svw"}` |
539
- | `w-lvw` | `{"width":"100lvw"}` |
540
- | `min-h-dvh` | `{"min-height":"100dvh"}` |
541
- | `min-h-svh` | `{"min-height":"100svh"}` |
542
- | `min-h-lvh` | `{"min-height":"100lvh"}` |
554
+ | `min-h-screen` | `min-height: 100vh` |
555
+ | `max-h-screen` | `max-height: 100vh` |
556
+ | `min-w-screen` | `min-width: 100vw` |
557
+ | `h-dvh` | `height: 100dvh` |
558
+ | `h-svh` | `height: 100svh` |
559
+ | `h-lvh` | `height: 100lvh` |
560
+ | `w-dvw` | `width: 100dvw` |
561
+ | `w-svw` | `width: 100svw` |
562
+ | `w-lvw` | `width: 100lvw` |
563
+ | `min-h-dvh` | `min-height: 100dvh` |
564
+ | `min-h-svh` | `min-height: 100svh` |
565
+ | `min-h-lvh` | `min-height: 100lvh` |
543
566
 
544
567
  ### Accessibility
545
568
 
546
569
  | Utility | Description |
547
570
  | --- | --- |
548
- | `sr-only` | `{"position":"absolute","width":"1px","height":"1px","padding":"0","margin":"-1px","overflow":"hidden","clip":"rect(0, 0, 0, 0)","white-space":"nowrap","border-width":"0"}` |
549
- | `not-sr-only` | `{"position":"static","width":"auto","height":"auto","padding":"0","margin":"0","overflow":"visible","clip":"auto","white-space":"normal"}` |
571
+ | `sr-only` | `position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0` |
572
+ | `not-sr-only` | `position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal` |
550
573
 
551
574
  ### Other Utilities
552
575
 
553
576
  | Utility | Description |
554
577
  | --- | --- |
555
- | `no-underline` | `{"text-decoration":"none"}` |
556
- | `grid` | `{"display":"grid"}` |
557
- | `box-border` | `{"box-sizing":"border-box"}` |
558
- | `box-content` | `{"box-sizing":"content-box"}` |
559
- | `appearance-none` | `{"appearance":"none","-webkit-appearance":"none","-moz-appearance":"none"}` |
578
+ | `no-underline` | `text-decoration: none` |
579
+ | `grid` | `display: grid` |
580
+ | `box-border` | `box-sizing: border-box` |
581
+ | `box-content` | `box-sizing: content-box` |
582
+ | `appearance-none` | `appearance: none; -webkit-appearance: none; -moz-appearance: none` |
560
583
  | `text-{0-99}px` | Font size in pixels (e.g., `text-12px`, `text-16px`) |
561
584
  | `text-{0-24.75}rem` | Font size in rem units (0.25rem increments) |
562
585
 
@@ -597,18 +620,13 @@ Custom values support pseudo-states, responsive breakpoints, and dark mode:
597
620
  <div class="hover:w-[200px] md:max-w-[900px] dark:bg-[#333]">
598
621
  ```
599
622
 
600
- ### Limitations
623
+ ### Binding
601
624
 
602
- **Static classes only**: Custom values work with the `class` attribute, not `:class`:
625
+ Rules are injected as Mancha renders the classes, so custom values work in the `class` attribute and in `:class` alike, including values that only appear after a state change.
603
626
 
604
- ```html
605
- <!-- ✓ Works -->
606
- <div class="w-[133px]">
627
+ Markup that Mancha did not render is the exception: it is never scanned, so call `scanAndInject(root)` after inserting it yourself.
607
628
 
608
- <!-- ✗ Not supported - use inline styles instead -->
609
- <div :class="'w-[133px]'">
610
- <div :attr:style="'width: ' + dynamicWidth">
611
- ```
629
+ ### Limitations
612
630
 
613
631
  **Browser only**: Custom values require the CSSStyleSheet API and are not available in Worker or SSR environments.
614
632
 
@@ -621,7 +639,21 @@ Custom values support pseudo-states, responsive breakpoints, and dark mode:
621
639
 
622
640
  ### Dynamic Content
623
641
 
624
- For content added after initial load, call `injectCss(["custom"])` again to scan and inject new on-demand values.
642
+ Content rendered by Mancha is scanned automatically. Markup produced by anything else (raw `innerHTML`, a third-party widget) is not, so scan it yourself with `scanAndInject(root)`:
643
+
644
+ ```js
645
+ import { scanAndInject } from "mancha/browser";
646
+
647
+ widget.mount(container); // Third-party code writes into the container.
648
+ scanAndInject(container);
649
+ ```
650
+
651
+ Re-scanning an already-scanned tree is safe: each rule is injected once, and rules are re-injected if the stylesheet element is removed from the document.
652
+
653
+ Two limitations:
654
+
655
+ - **ESM only**: `scanAndInject` is exported from the module build, not from the global bundle loaded via a `<script>` tag.
656
+ - **No shadow DOM**: `querySelectorAll` does not pierce a shadow root, so scanning a host element finds nothing inside it. Scanning the shadow root itself does inject rules, but they land in the main document's stylesheet, where shadow-boundary scoping stops them from applying. Style shadow content with its own stylesheet instead.
625
657
 
626
658
  ---
627
659