@ibnlanre/jumi 0.1.0 → 0.1.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.
- package/CHANGELOG.md +22 -0
- package/README.md +60 -9
- package/SKILL.md +1194 -0
- package/package.json +4 -2
package/SKILL.md
ADDED
|
@@ -0,0 +1,1194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jumi
|
|
3
|
+
description: Write motion with Jumi, a Tailwind CSS v4 plugin. Use when adding animation, property tweens, phrases, staggering, scroll-driven motion, transitions or view transitions to markup, or when wiring Jumi into a Vite, PostCSS, Astro or CLI build.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Jumi
|
|
7
|
+
|
|
8
|
+
Jumi is a motion vocabulary for Tailwind CSS v4. You write classes, Tailwind compiles them, and a build
|
|
9
|
+
step finishes the stylesheet. Nothing of Jumi's ships to the browser: the output is ordinary
|
|
10
|
+
`animation-*` and `transition-*` declarations, so the browser's own CSS engine runs the motion.
|
|
11
|
+
|
|
12
|
+
There are 235 named effects, 395 property targets, timing controls for every one of them, a way to write
|
|
13
|
+
a keyframe inside a class name, a stagger, scroll-driven timelines, and transitions for both state changes
|
|
14
|
+
and page changes. This skill is the whole vocabulary and the rules that hold it together.
|
|
15
|
+
|
|
16
|
+
Reading it in order is the fastest route. Sections 1 to 4 are the minimum to write working markup;
|
|
17
|
+
sections 5 to 12 are one feature each; 13 to 15 are the rules and the failure modes; the appendices list
|
|
18
|
+
every class name the library can compile.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Set it up
|
|
23
|
+
|
|
24
|
+
Install Jumi in a project that already has Tailwind CSS configured:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
pnpm add @ibnlanre/jumi
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`npm install @ibnlanre/jumi`, `yarn add @ibnlanre/jumi` and `bun add @ibnlanre/jumi` work the same way.
|
|
31
|
+
|
|
32
|
+
Jumi has two halves, and both are needed:
|
|
33
|
+
|
|
34
|
+
| Half | What it is | What it does |
|
|
35
|
+
| ----------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
36
|
+
| The plugin | `@plugin "@ibnlanre/jumi"` | Teaches Tailwind the utilities, so `animate-fade-in` compiles to real CSS |
|
|
37
|
+
| Integration | `jumi()` from `@ibnlanre/jumi/vite`, or `@ibnlanre/jumi/postcss` | Assembles the animation lists once every `animate-*` class has been compiled |
|
|
38
|
+
|
|
39
|
+
Wire up only the plugin and the utilities compile while the page stays still, with no error. The lists
|
|
40
|
+
cannot be written while any single utility is being compiled, because they depend on which other classes
|
|
41
|
+
are present. So the integration is the half that makes motion happen.
|
|
42
|
+
|
|
43
|
+
### Vite, the short route (recommended)
|
|
44
|
+
|
|
45
|
+
Replace Tailwind's plugin with Jumi's. One entry does both jobs:
|
|
46
|
+
|
|
47
|
+
```diff
|
|
48
|
+
- import tailwindcss from '@tailwindcss/vite'
|
|
49
|
+
+ import jumi from '@ibnlanre/jumi/vite'
|
|
50
|
+
|
|
51
|
+
export default defineConfig({
|
|
52
|
+
- plugins: [tailwindcss()],
|
|
53
|
+
+ plugins: [jumi()],
|
|
54
|
+
})
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Your stylesheet does not mention Jumi:
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
@import 'tailwindcss';
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then import that stylesheet from your application's entry point. Tailwind has to scan the files holding
|
|
64
|
+
your classes, so keep them in files it can see.
|
|
65
|
+
|
|
66
|
+
### Vite, the explicit route
|
|
67
|
+
|
|
68
|
+
Register the plugin in CSS, and finish the stylesheet with Jumi beside Tailwind's plugin. Both routes
|
|
69
|
+
compile to the same CSS:
|
|
70
|
+
|
|
71
|
+
```css
|
|
72
|
+
@import 'tailwindcss';
|
|
73
|
+
@plugin "@ibnlanre/jumi";
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
// vite.config.ts: Tailwind's entry, plus Jumi after it
|
|
78
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
79
|
+
import { jumiFinalizer } from '@ibnlanre/jumi/vite'
|
|
80
|
+
|
|
81
|
+
export default defineConfig({ plugins: [tailwindcss(), jumiFinalizer()] })
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### PostCSS
|
|
85
|
+
|
|
86
|
+
One entry replaces `@tailwindcss/postcss`:
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
// postcss.config.js
|
|
90
|
+
export default { plugins: { '@ibnlanre/jumi/postcss': {} } }
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If `@tailwindcss/postcss` is configured separately and you would rather not replace it, put
|
|
94
|
+
`jumiFinalizer()` from `@ibnlanre/jumi/postcss` after it and keep `@plugin "@ibnlanre/jumi";` in the
|
|
95
|
+
stylesheet, since nothing registers Jumi in that shape.
|
|
96
|
+
|
|
97
|
+
### Tailwind CLI or a plain script
|
|
98
|
+
|
|
99
|
+
The CLI has no hook to finish in, so run one step after Tailwind writes its output:
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
import { finalizeCss } from '@ibnlanre/jumi'
|
|
103
|
+
|
|
104
|
+
const { css } = finalizeCss(readFileSync('dist/output.css', 'utf8'))
|
|
105
|
+
writeFileSync('dist/output.css', css)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Astro
|
|
109
|
+
|
|
110
|
+
```js
|
|
111
|
+
import { defineConfig } from 'astro/config'
|
|
112
|
+
import jumi from '@ibnlanre/jumi/vite'
|
|
113
|
+
|
|
114
|
+
export default defineConfig({
|
|
115
|
+
vite: { plugins: [jumi()] },
|
|
116
|
+
})
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Then import your stylesheet from an Astro layout.
|
|
120
|
+
|
|
121
|
+
### Two setup rules that cause most "it does not work" reports
|
|
122
|
+
|
|
123
|
+
1. **Write complete class names.** Tailwind finds classes by scanning text, so a class built from
|
|
124
|
+
fragments such as `` `animate-${effect}` `` is never seen. Map choices to full class strings, or
|
|
125
|
+
register them explicitly:
|
|
126
|
+
|
|
127
|
+
```css
|
|
128
|
+
@source inline("animate-bounce-in animate-fade-in animate-reveal-swipe");
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
2. **Check the integration, not just the plugin.** If a motion compiles into the stylesheet but nothing
|
|
132
|
+
moves, the finalizer did not run. Section 15 is the checklist.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 2. The model: five kinds of motion
|
|
137
|
+
|
|
138
|
+
Every Jumi class is one of five things. Knowing which kind you are writing is most of the expertise,
|
|
139
|
+
because they compose differently.
|
|
140
|
+
|
|
141
|
+
| Kind | Example | What it means |
|
|
142
|
+
| ------------------- | ------------------------------ | ------------------------------------------------------------ |
|
|
143
|
+
| **Effect** | `animate-bounce-in` | A named keyframe timeline, ready to run |
|
|
144
|
+
| **Property target** | `animate-rotate-45` | Animate one CSS property toward a value |
|
|
145
|
+
| **Phrase** | `animate-opacity-[0:0\|100:1]` | Write the frames of one property in the class name |
|
|
146
|
+
| **Control** | `animation-duration-800` | Configure timing, repetition, direction, playback, timelines |
|
|
147
|
+
| **Transition** | `transition-property/scale` | Motion between two states of the element |
|
|
148
|
+
|
|
149
|
+
Two laws govern the whole system:
|
|
150
|
+
|
|
151
|
+
- **A control never creates motion.** It configures a motion that exists, or it does nothing at all.
|
|
152
|
+
`animation-duration-500` on an element with no animation writes a variable and animates nothing. The
|
|
153
|
+
same is true of `animation-duration-500/reveal` when nothing is named `reveal`.
|
|
154
|
+
- **Motion comes from a declaration, not from a wrapper.** There is no setup class, no provider, no
|
|
155
|
+
`motion` attribute. An element animates because it carries an effect, a property target, a phrase, or a
|
|
156
|
+
transition property.
|
|
157
|
+
|
|
158
|
+
Composition is automatic. One element can carry as many motion utilities as you like, and each declares
|
|
159
|
+
its own value; the build gathers them into the animation lists the browser needs.
|
|
160
|
+
|
|
161
|
+
```html
|
|
162
|
+
<div
|
|
163
|
+
class="animate-rotate-45 animate-scale-110
|
|
164
|
+
animation-duration-800/rotate animation-duration-1200/scale
|
|
165
|
+
animation-direction-alternate animation-iteration-count-infinite"
|
|
166
|
+
>
|
|
167
|
+
Two rhythms. One element.
|
|
168
|
+
</div>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 3. Effects
|
|
174
|
+
|
|
175
|
+
An effect is a complete, named keyframe animation. Put it on the element and it runs once, in one second,
|
|
176
|
+
easing in and out of rest, holding its final value.
|
|
177
|
+
|
|
178
|
+
```html
|
|
179
|
+
<div class="animate-bounce-in animation-duration-800">Make your move.</div>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Measured defaults for every element Jumi animates:
|
|
183
|
+
|
|
184
|
+
| Setting | Default |
|
|
185
|
+
| ----------- | ----------------------------------------------- |
|
|
186
|
+
| Duration | `1s` |
|
|
187
|
+
| Easing | `ease` |
|
|
188
|
+
| Delay | `0s`, or the stagger's distribution (section 8) |
|
|
189
|
+
| Iterations | `1` |
|
|
190
|
+
| Direction | `normal` |
|
|
191
|
+
| Fill mode | `forwards` (the final frame is held) |
|
|
192
|
+
| Play state | `running` |
|
|
193
|
+
| Composition | `replace` |
|
|
194
|
+
|
|
195
|
+
Use `motion-safe:` for decorative entrances so the visitor's preference is respected:
|
|
196
|
+
|
|
197
|
+
```html
|
|
198
|
+
<div class="motion-safe:animate-fade-in-up animation-duration-[600ms]">
|
|
199
|
+
Nice to see you.
|
|
200
|
+
</div>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Choosing effects
|
|
204
|
+
|
|
205
|
+
- **Entrances** are named `-in`: `fade-in`, `bounce-in-up`, `slide-in-left`, `zoom-in-elastic`,
|
|
206
|
+
`blinds-in-y`, `unmask-top-left`, `diamond-in`, `triangle-in-bottom-right`.
|
|
207
|
+
- **Exits** are named `-out`: `fade-out`, `slide-out-up`, `zoom-out-elastic`, `hinge-drop`,
|
|
208
|
+
`radial-wipe-out`, `mask-center`.
|
|
209
|
+
- **Attention** effects repeat naturally: `pulsing`, `spinning`, `floating`, `wiggle`, `shimmer`,
|
|
210
|
+
`wobbling`. Pair them with `animation-iteration-count-infinite`.
|
|
211
|
+
- **Emphasis** effects are one-shot highlights: `bounce`, `flash`-like `flicker`, `pop`-like `jello`,
|
|
212
|
+
`tada`, `heart-beat`, `shake`, `swing`.
|
|
213
|
+
- **Presentation** effects own `clip-path` and reveal one stationary element: `reveal-*`, `wipe-*`-style
|
|
214
|
+
`radial-wipe-*`, `blinds-*`, `mask-*`, `unmask-*`, `circle-*`, `square-*`, `diamond-*`, `triangle-*`,
|
|
215
|
+
`iris`-style `radial-*`.
|
|
216
|
+
|
|
217
|
+
Effect names are hyphenated and directional: `-in`, `-out`, `-in-up`, `-out-left`, `-in-top-right`.
|
|
218
|
+
`-bottom`/`-top`/`-left`/`-right` and `-up`/`-down` are used as the family's geometry requires, so read
|
|
219
|
+
the name or check the catalog rather than assuming a pair exists in every direction.
|
|
220
|
+
|
|
221
|
+
### Effects compete for properties
|
|
222
|
+
|
|
223
|
+
An effect writes one or more CSS properties. Two effects writing the same property replace each other,
|
|
224
|
+
because `animation-composition` defaults to `replace`. Nest elements when you want independent layers:
|
|
225
|
+
|
|
226
|
+
```html
|
|
227
|
+
<div class="animate-fade-in">
|
|
228
|
+
<div
|
|
229
|
+
class="animate-spinning animation-duration-[8s] animation-timing-function-linear animation-iteration-count-infinite"
|
|
230
|
+
>
|
|
231
|
+
*
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
The same warning applies to a clip reveal beside another clip animation, and to anything writing
|
|
237
|
+
`transform` or `opacity` beside `hinge-drop`. A named motion gives you timing control, not conflict
|
|
238
|
+
resolution.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 4. Property targets
|
|
243
|
+
|
|
244
|
+
Where an effect is a whole timeline, a property target animates one CSS property toward a value:
|
|
245
|
+
|
|
246
|
+
```html
|
|
247
|
+
<div
|
|
248
|
+
class="animate-rotate-[0.25turn] animate-scale-110 animation-duration-[3s]"
|
|
249
|
+
>
|
|
250
|
+
Toward a value.
|
|
251
|
+
</div>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Names follow the CSS specification: `animate-{property}-{value}`. If you know the CSS property, you know the
|
|
255
|
+
class. `animate-background-color-red-600`, `animate-border-radius-[40px]`, `animate-box-shadow-blur-[8px]`,
|
|
256
|
+
`animate-filter-blur-[8px]`, `animate-stroke-width-4`, `animate-z-index-10`, `animate-grid-column-start-2`,
|
|
257
|
+
`animate-hyphenate-limit-chars-minimum-word-length-4`.
|
|
258
|
+
|
|
259
|
+
### Where values come from
|
|
260
|
+
|
|
261
|
+
1. **Tailwind's theme scales**: `animate-background-color-blue-500` compiles to
|
|
262
|
+
`var(--color-blue-500)`, and spacing, opacity and font scales work the same way.
|
|
263
|
+
2. **Bare numbers**, converted to the unit the property needs:
|
|
264
|
+
- `animate-rotate-45` is `45deg`
|
|
265
|
+
- `animate-opacity-50` is `0.5`
|
|
266
|
+
- `animate-scale-110` is `1.1`
|
|
267
|
+
3. **Arbitrary values in brackets**, which are the escape hatch for anything else:
|
|
268
|
+
`animate-width-[240px]`, `animate-rotate-[0.25turn]`, `animate-filter-blur-[8px]`,
|
|
269
|
+
`animate-offset-distance-100`, `animate-width-[calc-size(auto,size+2rem)]`.
|
|
270
|
+
|
|
271
|
+
When a bare number's meaning is ambiguous for the property, write the arbitrary form with an explicit
|
|
272
|
+
unit. `animation-duration-800` is 800 milliseconds, and so is `animation-duration-[800ms]`; `[0.8s]` is
|
|
273
|
+
equivalent too.
|
|
274
|
+
|
|
275
|
+
### Each property keeps a resting value
|
|
276
|
+
|
|
277
|
+
Every animatable property has an underlying value that the animation travels from. Measured, Jumi sets
|
|
278
|
+
`--jumi-opacity: 1`, `--jumi-width: auto`, `--jumi-background-color: transparent`,
|
|
279
|
+
`--jumi-filter-blur: blur(0)`, `--jumi-translate-x: 0px`, `--jumi-scale: 1 1 1`. A property target
|
|
280
|
+
writes a `to` frame, so the motion starts from the element's own styles. Set a deliberate starting value
|
|
281
|
+
in your own CSS when the resting value is not what you want to interpolate from.
|
|
282
|
+
|
|
283
|
+
### Compound properties share one slot
|
|
284
|
+
|
|
285
|
+
Compound CSS values are assembled from parts, and the parts share the compound property's timing. Blur and
|
|
286
|
+
brightness both feed the filter, so their rhythm is `filter`:
|
|
287
|
+
|
|
288
|
+
```html
|
|
289
|
+
<div
|
|
290
|
+
class="animate-filter-blur-[4px] animate-filter-brightness-[1.2] animation-duration-[900ms]/filter"
|
|
291
|
+
>
|
|
292
|
+
A softer glow.
|
|
293
|
+
</div>
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
The same is true of transform parts (`/transform` covers `animate-translate-x-*`, `animate-rotate-*`,
|
|
297
|
+
`animate-scale-*` and the rest), box-shadow parts, text-shadow parts, border-radius corners,
|
|
298
|
+
background-position axes and mask-border parts. Address the compound, not the part.
|
|
299
|
+
|
|
300
|
+
### Keyword sizes belong to the platform
|
|
301
|
+
|
|
302
|
+
`auto`, `min-content`, `max-content` and `fit-content` interpolate only with `interpolate-size:
|
|
303
|
+
allow-keywords`. Jumi does not set it, because the declaration is inherited and setting it on an element
|
|
304
|
+
opts in everything beneath it:
|
|
305
|
+
|
|
306
|
+
```html
|
|
307
|
+
<div class="interpolate-size-allow-keywords animate-width-auto w-[200px]">
|
|
308
|
+
Keyword target.
|
|
309
|
+
</div>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Without it the target still applies, but as a discrete change: the property holds its starting value and
|
|
313
|
+
flips at the midpoint. `interpolate-size-numeric-only` stops a subtree inheriting the switch. A value
|
|
314
|
+
carrying its own intrinsic size needs no switch at all:
|
|
315
|
+
`animate-width-[calc-size(auto,size+2rem)]`.
|
|
316
|
+
|
|
317
|
+
### Motion paths
|
|
318
|
+
|
|
319
|
+
A path is declared once and the distance along it is animated:
|
|
320
|
+
|
|
321
|
+
```html
|
|
322
|
+
<div
|
|
323
|
+
class="[offset-path:path('M0,0_L200,0_L200,200')] [offset-rotate:auto]
|
|
324
|
+
animate-offset-distance-100 animation-duration-2000"
|
|
325
|
+
></div>
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
`offset-path`, `offset-rotate`, `offset-anchor` and `offset-position` are written once as ordinary
|
|
329
|
+
utilities with arbitrary values. `offset-distance` is the animated property, and because it is an ordinary
|
|
330
|
+
animation, everything else composes with it, including scroll timelines. Animating `offset-path` itself
|
|
331
|
+
from `none` is a discrete step rather than an ease onto the path, so declare the path.
|
|
332
|
+
|
|
333
|
+
### SVG strokes
|
|
334
|
+
|
|
335
|
+
Dash patterns and offsets are ordinary property animations:
|
|
336
|
+
|
|
337
|
+
```html
|
|
338
|
+
<svg viewBox="0 0 240 80">
|
|
339
|
+
<path
|
|
340
|
+
d="M 10 40 H 230"
|
|
341
|
+
fill="none"
|
|
342
|
+
stroke="currentColor"
|
|
343
|
+
stroke-width="4"
|
|
344
|
+
stroke-dasharray="8 4"
|
|
345
|
+
class="animate-stroke-dashoffset-[0:12|40:4|100:0]/trace
|
|
346
|
+
animation-duration-[2s]/trace animation-timing-function-linear/trace"
|
|
347
|
+
/>
|
|
348
|
+
</svg>
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
`animate-stroke-dasharray-*` takes `none`, numbers, lengths, percentages and dash lists (use underscores
|
|
352
|
+
for spaces, or commas). `animate-stroke-dashoffset-*` takes numbers, lengths and percentages, including
|
|
353
|
+
negatives. Percentages resolve against the SVG viewport, not the path length, so a stroke-drawing recipe
|
|
354
|
+
needs an explicit `pathLength` and dash convention on the asset. Jumi exposes the properties; it does not
|
|
355
|
+
ship a `draw` preset.
|
|
356
|
+
|
|
357
|
+
### CSS still decides what can interpolate
|
|
358
|
+
|
|
359
|
+
A utility cannot make a non-animatable property interpolate. Some properties change discretely, and some,
|
|
360
|
+
such as `width`, trigger layout work on every frame. Prefer `transform` and `opacity` for frequent
|
|
361
|
+
decorative motion, and test the expensive properties on your target devices.
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## 5. Phrases: a keyframe written in a class name
|
|
366
|
+
|
|
367
|
+
A phrase declares the frames of one property inside the utility:
|
|
368
|
+
|
|
369
|
+
```html
|
|
370
|
+
<div
|
|
371
|
+
class="animate-scale-[0:0.5|50:1.1|100:1] animate-opacity-[0:0|50:1|100:1]
|
|
372
|
+
animation-duration-2600 animation-iteration-count-infinite"
|
|
373
|
+
>
|
|
374
|
+
Gather, overshoot, settle.
|
|
375
|
+
</div>
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
No `@keyframes` block, no stylesheet edit, no runtime. The class compiles to a keyframe rule of its own.
|
|
379
|
+
|
|
380
|
+
### The grammar
|
|
381
|
+
|
|
382
|
+
```text
|
|
383
|
+
phrase := frame ("|" frame)*
|
|
384
|
+
frame := offset-list ":" value
|
|
385
|
+
offset-list := <offset> ("," <offset>)*
|
|
386
|
+
offset := 0 to 100, integer or decimal, the % is implied and never written
|
|
387
|
+
value := any CSS value
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
- **Frames are separated by a pipe.** `0:0|100:1` is two frames.
|
|
391
|
+
- **One value may carry several offsets.** `0,100:45deg|50:0deg` is two frames, not three, and it declares
|
|
392
|
+
the same motion as `0:45deg|50:0deg|100:45deg`.
|
|
393
|
+
- **A frame may omit its offset**, and then it takes the property's resting value. That is why a phrase
|
|
394
|
+
holds still until its first frame and closes itself at the end, and why it is safe to run `infinite`:
|
|
395
|
+
the loop has no seam.
|
|
396
|
+
- **A property taking several values takes all of them at each frame**, with `_` standing in for the
|
|
397
|
+
space. `animate-scale-[0:0.42_0.30|50:1.03_1.03]` scales both axes together.
|
|
398
|
+
- **A bare value is the degenerate phrase.** `animate-rotate-45` means `45deg` at the end.
|
|
399
|
+
|
|
400
|
+
### Why the separator is a pipe
|
|
401
|
+
|
|
402
|
+
A comma is a legitimate CSS value character, as in `translate(1px, 2px)`, so it cannot separate frames.
|
|
403
|
+
Measured: `animate-opacity-[0:0|100:1]` builds a two-stop keyframe, while `animate-opacity-[0:0,100:1]`
|
|
404
|
+
builds **one** stop and warns about nothing, because it is a legal single frame whose value happens to
|
|
405
|
+
contain a comma. Semicolons are refused outright by the host, and `%` and `!` are legal CSS values too.
|
|
406
|
+
Write pipes, and read a phrase that animates nothing as a separator mistake first.
|
|
407
|
+
|
|
408
|
+
### Identity and reuse
|
|
409
|
+
|
|
410
|
+
A phrase is hashed from its canonical frames: frames are sorted by offset, duplicated offsets are
|
|
411
|
+
last-wins, and the result is trimmed. So `0:a|50:b` and `50:b|0:a` are one keyframe, and two elements
|
|
412
|
+
sharing a phrase share one rule. A different phrase gets a rule of its own. Measured, the same phrase
|
|
413
|
+
twice on a page emits one keyframe and two different phrases emit two.
|
|
414
|
+
|
|
415
|
+
Nothing else can change what your phrase does, which is also why you write **one phrase per property per
|
|
416
|
+
element** rather than layering several.
|
|
417
|
+
|
|
418
|
+
### Naming a phrase as a slot
|
|
419
|
+
|
|
420
|
+
Append `/name` where you declare it, and address it with the same word in the controls:
|
|
421
|
+
|
|
422
|
+
```html
|
|
423
|
+
<div
|
|
424
|
+
class="animate-clip-path-[0:inset(0_100%_0_0)|100:inset(0_0%_0_0)]/reveal
|
|
425
|
+
animation-duration-[900ms]/reveal
|
|
426
|
+
animation-timing-function-ease-out/reveal"
|
|
427
|
+
>
|
|
428
|
+
Frames and controls, one slot.
|
|
429
|
+
</div>
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
A name is one word, so it is usually written bare. Brackets are for a name that needs them, and a name
|
|
433
|
+
cannot contain whitespace: an underscore inside brackets becomes a space in the custom property name, so
|
|
434
|
+
it is reported and dropped rather than written.
|
|
435
|
+
|
|
436
|
+
A phrase is a value, so it can live in your Tailwind theme and be referenced by name:
|
|
437
|
+
|
|
438
|
+
```js
|
|
439
|
+
theme: {
|
|
440
|
+
rotate: {
|
|
441
|
+
unfurl: '0:16deg,58:0deg'
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
and then used as `animate-rotate-unfurl`, which keeps the frames in one place when several elements share
|
|
447
|
+
them.
|
|
448
|
+
|
|
449
|
+
### What is refused
|
|
450
|
+
|
|
451
|
+
An offset outside 0 to 100 is reported and dropped: the motion emits nothing and the build warns with the
|
|
452
|
+
class and the offset it refused, rather than handing the browser a frame it will discard. Measured, the
|
|
453
|
+
warning names both, for example `a phrase's offsets are percentages in 0-100, and this one writes 150`.
|
|
454
|
+
An ordinary arbitrary value is validated differently: `animate-offset-distance-[50%]` is accepted while
|
|
455
|
+
`animate-offset-distance-[abc]` produces no rule at all, because the host checks a plain value against the
|
|
456
|
+
property's CSS type while a phrase is checked against Jumi's own grammar.
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## 6. Controls
|
|
461
|
+
|
|
462
|
+
Controls configure a motion. They never create one.
|
|
463
|
+
|
|
464
|
+
| Control | Syntax | Accepted values |
|
|
465
|
+
| --------------- | ---------------------------------------------------- | --------------------------------------------------------- |
|
|
466
|
+
| Duration | `animation-duration-800`, `[1.2s]` | Bare number is milliseconds; arbitrary values take a unit |
|
|
467
|
+
| Delay | `animation-delay-150`, `[150ms]` | Same |
|
|
468
|
+
| Easing | `animation-timing-function-ease-out-quint` | 37 named curves, or `[cubic-bezier(.4,0,.6,1)]` |
|
|
469
|
+
| Iterations | `animation-iteration-count-3`, `-infinite` | 1 to 10 by name, `infinite`, or an arbitrary number |
|
|
470
|
+
| Direction | `animation-direction-alternate` | `normal`, `reverse`, `alternate`, `alternate-reverse` |
|
|
471
|
+
| Fill mode | `animation-fill-mode-both` | `none`, `forwards`, `backwards`, `both` |
|
|
472
|
+
| Play state | `animation-play-state-paused` | `running`, `paused` |
|
|
473
|
+
| Composition | `animation-composition-add` | `replace`, `add`, `accumulate` |
|
|
474
|
+
| Name | `animation-name-[none]` | `none`, used to switch off what an element was given |
|
|
475
|
+
| Timeline, range | `animation-timeline-scroll`, `animation-range-entry` | Section 10 |
|
|
476
|
+
| Transitions | `transition-duration-300` | Section 9 |
|
|
477
|
+
|
|
478
|
+
A control written on its own is configuration waiting for a motion:
|
|
479
|
+
|
|
480
|
+
```html
|
|
481
|
+
<div
|
|
482
|
+
class="animate-rotate-90 animation-duration-1400 animation-timing-function-ease-in-out
|
|
483
|
+
animation-direction-alternate animation-iteration-count-infinite"
|
|
484
|
+
>
|
|
485
|
+
Back and forth.
|
|
486
|
+
</div>
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
Easing names cover the common curves and their families: `linear`, `ease`, `ease-in`, `ease-out`,
|
|
490
|
+
`ease-in-out`, `step-start`, `step-end`, plus `-quad`, `-cubic`, `-quart`, `-quint`, `-sine`, `-circ`,
|
|
491
|
+
`-expo`, `-back` in the `in`, `out` and `in-out` forms, and `ease-entrance`, `ease-exit`,
|
|
492
|
+
`ease-exit-sharp`, `ease-smooth`, `ease-bounce-out`, `ease-elastic`. Appendix C lists all of them.
|
|
493
|
+
Use `linear` for steady rotation, and a `-back` or `-elastic` curve when you want overshoot.
|
|
494
|
+
|
|
495
|
+
### Altering rather than replacing
|
|
496
|
+
|
|
497
|
+
`animation-composition` decides how two animations of one property combine. The default `replace` gives
|
|
498
|
+
the last entry the win; `add` lets both apply at once:
|
|
499
|
+
|
|
500
|
+
```html
|
|
501
|
+
<div
|
|
502
|
+
class="animate-rotate-[0:0deg|12:-8deg|100:-8deg]/flick
|
|
503
|
+
animate-rotate-[0:0deg|12:0deg|100:8deg]/return
|
|
504
|
+
animation-composition-add/rotate
|
|
505
|
+
animation-timing-function-ease-in-out-circ/flick
|
|
506
|
+
animation-timing-function-linear/return
|
|
507
|
+
animation-iteration-count-infinite"
|
|
508
|
+
>
|
|
509
|
+
A flick that lands, then a plain return.
|
|
510
|
+
</div>
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
That is the pattern for one property needing two different rhythms, since a single easing applies to every
|
|
514
|
+
segment of one animation.
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
## 7. Addressing one motion
|
|
519
|
+
|
|
520
|
+
A control may be scoped to a single animation with a slash. What you write after the slash is either a
|
|
521
|
+
**property** Jumi animates (`/rotate`, `/scale`, `/filter`) or a **name** you chose (`/reveal`,
|
|
522
|
+
`/flick`).
|
|
523
|
+
|
|
524
|
+
```html
|
|
525
|
+
<div
|
|
526
|
+
class="animate-rotate-45 animate-scale-110
|
|
527
|
+
animation-duration-500 animation-duration-1200/rotate"
|
|
528
|
+
>
|
|
529
|
+
Scale at 500ms. Rotate at 1200ms.
|
|
530
|
+
</div>
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
An unscoped control is the fallback every animation reads when it has nothing narrower. The resolution
|
|
534
|
+
order is **name, then property or effect, then global**. Measured on `animate-fade-in/reveal`, the emitted
|
|
535
|
+
chain is
|
|
536
|
+
`var(--jumi-label-reveal-animation-duration, var(--jumi-fade-in-animation-duration, var(--jumi-animation-duration)))`.
|
|
537
|
+
|
|
538
|
+
Rules worth knowing before you name anything:
|
|
539
|
+
|
|
540
|
+
- **A word that is a property belongs to that property.** `animation-duration-500/scale` reaches every
|
|
541
|
+
motion animating `scale`, in every stylesheet, whether or not this element animates it. Give a motion
|
|
542
|
+
its own word, and make it a word that is not a property. A collision is reported, not dropped:
|
|
543
|
+
measured, naming a rotate motion `scale` warns that the name is also a property and to reword it.
|
|
544
|
+
- **A control for a name that is not present does nothing**, exactly like an unscoped control. That is
|
|
545
|
+
why a named control beside a conditional motion is unremarkable.
|
|
546
|
+
- **Two motions on one element may share a name**, and then a control written for that name reaches both.
|
|
547
|
+
That is how several properties are tuned as one thing.
|
|
548
|
+
- **Names do not travel into descendants.** A wrapper and the element inside it can use the same word
|
|
549
|
+
without knowing about each other.
|
|
550
|
+
- **A property scope does cross a wrapper boundary**, because nothing declares that property's variable
|
|
551
|
+
on the element. Measured, a `/{property}` control on a wrapper reaches an unlabelled animation inside
|
|
552
|
+
it.
|
|
553
|
+
- **A global control does not cross it.** Every animating element declares the global defaults itself,
|
|
554
|
+
and a declaration beats inheritance. Measured, a wrapper's `--jumi-animation-duration: 5s` leaves a
|
|
555
|
+
child at `1s`.
|
|
556
|
+
|
|
557
|
+
Because a name is written into the rule, you can retime that animation from your own CSS without touching
|
|
558
|
+
the markup:
|
|
559
|
+
|
|
560
|
+
```css
|
|
561
|
+
.petal {
|
|
562
|
+
--jumi-label-flick-animation-duration: 900ms;
|
|
563
|
+
}
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
## 8. Stagger
|
|
569
|
+
|
|
570
|
+
The stagger distributes a delay across the direct children of the element it is written on. Put the
|
|
571
|
+
stagger on the parent and the children's motion on the parent too, with Tailwind's `*:` variant:
|
|
572
|
+
|
|
573
|
+
```html
|
|
574
|
+
<div class="animate-stagger-forward-[120ms]/3 *:animate-bounce-in">
|
|
575
|
+
<div>One</div>
|
|
576
|
+
<div>Two</div>
|
|
577
|
+
<div>Three</div>
|
|
578
|
+
</div>
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
Delays are 0ms, 120ms and 240ms. `animate-stagger-backward-[150ms]/3` runs the same distribution
|
|
582
|
+
backwards. The interval is the value; the number after the slash is the child count.
|
|
583
|
+
|
|
584
|
+
- **The count-free form adapts to any list.** `animate-stagger-forward-[100ms]` emits one rule using
|
|
585
|
+
`sibling-index()` and `sibling-count()`, which Chrome, Edge and Safari support.
|
|
586
|
+
- **The `/{count}` form generates an `:nth-child` fallback** for browsers without those functions. Engines
|
|
587
|
+
that have them still take the adaptive rule, so the count is a compatibility hint rather than a hard
|
|
588
|
+
limit. Keep it aligned with the number of children you mean to stagger.
|
|
589
|
+
- **The relationship must be direct.** The delay variable is written to direct children, so adding
|
|
590
|
+
wrappers between the parent and the animated elements stops the distribution. Move the parent closer.
|
|
591
|
+
- **An explicit delay on the child wins.** `animation-delay-*` written on a child overrides the stagger's
|
|
592
|
+
fallback for that child.
|
|
593
|
+
|
|
594
|
+
The stagger is delay-based, which matters for scroll-driven motion: a staggered group is staggered along
|
|
595
|
+
the scroll, with each child's motion compressed into its own share of the range.
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
## 9. Transitions between states
|
|
600
|
+
|
|
601
|
+
A transition animates a change of state rather than animating on arrival. `transition-property/…` is what
|
|
602
|
+
activates one:
|
|
603
|
+
|
|
604
|
+
```html
|
|
605
|
+
<button
|
|
606
|
+
class="transition-property/scale transition-duration-300
|
|
607
|
+
hover:scale-110 focus-visible:scale-110"
|
|
608
|
+
>
|
|
609
|
+
Take a closer look.
|
|
610
|
+
</button>
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
`transition-duration`, `transition-delay` and `transition-timing-function` configure it, and all three
|
|
614
|
+
take the same `/{property}` scope:
|
|
615
|
+
|
|
616
|
+
```html
|
|
617
|
+
<button
|
|
618
|
+
class="transition-property/background-color transition-property/scale
|
|
619
|
+
transition-duration-[200ms]/background-color transition-delay-[80ms]/background-color
|
|
620
|
+
transition-timing-function-ease-out/scale
|
|
621
|
+
bg-lime-300 hover:bg-lime-200 hover:scale-110"
|
|
622
|
+
>
|
|
623
|
+
A delayed colour and a lifted card.
|
|
624
|
+
</button>
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
`transition-property/all` is available when you intentionally want everything transitionable. Explicit
|
|
628
|
+
property names make it easier to see which changes should move. Tailwind v4's `scale-*` utility writes the
|
|
629
|
+
individual `scale` property, so scope that transition with `/scale`.
|
|
630
|
+
|
|
631
|
+
A property the browser cannot interpolate, `display` being the usual one, does not transition unless you
|
|
632
|
+
say it may:
|
|
633
|
+
|
|
634
|
+
```html
|
|
635
|
+
<div
|
|
636
|
+
class="transition-property/display transition-duration-300 transition-behavior-allow-discrete"
|
|
637
|
+
>
|
|
638
|
+
Appear and disappear.
|
|
639
|
+
</div>
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
With that, the flip is placed so content stays on screen: at the start on the way in, at the end on the way
|
|
643
|
+
out. What it cannot supply is the before-style a first render has nothing to travel from. `@starting-style`
|
|
644
|
+
is plain CSS and belongs in your own stylesheet, next to the markup it describes.
|
|
645
|
+
|
|
646
|
+
---
|
|
647
|
+
|
|
648
|
+
## 10. Motion driven by scroll
|
|
649
|
+
|
|
650
|
+
Three declarations answer three different questions:
|
|
651
|
+
|
|
652
|
+
```text
|
|
653
|
+
animation what motion happens
|
|
654
|
+
animation-timeline what drives its progress
|
|
655
|
+
animation-range where on that driver the motion runs
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
A motion is not written differently when a scroll drives it. The same `animate-fade-in` is scrubbed by
|
|
659
|
+
scroll position the moment a timeline names the driver:
|
|
660
|
+
|
|
661
|
+
```html
|
|
662
|
+
<article class="animate-fade-in animation-timeline-view"></article>
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
- `animation-timeline-scroll` follows the nearest scroller.
|
|
666
|
+
- `animation-timeline-view` tracks the element through its scrollport.
|
|
667
|
+
- `animation-timeline-[--feed]` consumes a timeline your own CSS declares.
|
|
668
|
+
- `animation-timeline-scroller-nearest|root|self` picks which scroller a `scroll()` timeline takes.
|
|
669
|
+
- `animation-timeline-axis-block|inline|x|y` picks the axis.
|
|
670
|
+
- `animation-timeline-inset-start-[10%]` and `animation-timeline-inset-end-[25%]` place where tracking
|
|
671
|
+
begins and ends inside the scrollport for a `view` timeline.
|
|
672
|
+
|
|
673
|
+
Every one of those is a control: it configures a timeline, it does not give one, so it does nothing on an
|
|
674
|
+
element that names no driver.
|
|
675
|
+
|
|
676
|
+
### Declaring a named timeline
|
|
677
|
+
|
|
678
|
+
The declaration side is plain CSS on the scroller, and Jumi does not wrap it:
|
|
679
|
+
|
|
680
|
+
```css
|
|
681
|
+
#feed {
|
|
682
|
+
scroll-timeline-name: --feed;
|
|
683
|
+
scroll-timeline-axis: block;
|
|
684
|
+
}
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
```html
|
|
688
|
+
<div
|
|
689
|
+
class="h-64 overflow-y-auto"
|
|
690
|
+
id="feed"
|
|
691
|
+
>
|
|
692
|
+
<article class="animation-timeline-[--feed] animate-opacity-100">
|
|
693
|
+
Tracked entry.
|
|
694
|
+
</article>
|
|
695
|
+
</div>
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
Two details are easy to get subtly wrong. `--feed` in `scroll-timeline-name` is a timeline name, not a
|
|
699
|
+
custom property, so `var()` does not apply and the bracketed spelling is how it reaches the control;
|
|
700
|
+
`(--feed)` means `var(--feed)`, which is a different thing entirely. And a named timeline is visible to
|
|
701
|
+
the **descendants** of the element that declares it and to nothing else, not to siblings and not to the
|
|
702
|
+
document, so declare it on an element the animated content lives inside.
|
|
703
|
+
|
|
704
|
+
### Placing the motion
|
|
705
|
+
|
|
706
|
+
```html
|
|
707
|
+
<div class="animate-fade-in animation-range-entry"></div>
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
`animation-range-entry`, `-cover`, `-contain` and `-exit` name a whole range, and `-start-entry`,
|
|
711
|
+
`-end-exit`, `-start-offset-25` and `-end-offset-75` place a half. Anything with both a name and an offset
|
|
712
|
+
in it is the arbitrary form, and it is the one to reach for whenever an offset is involved, since the
|
|
713
|
+
value is written as it stands:
|
|
714
|
+
|
|
715
|
+
```html
|
|
716
|
+
<div class="animate-fade-in animation-range-[entry_0%_cover_50%]"></div>
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
The same vocabulary works as a prefix on a single motion, so one animation can be ranged while its
|
|
720
|
+
neighbour fills the whole range:
|
|
721
|
+
|
|
722
|
+
```html
|
|
723
|
+
<div
|
|
724
|
+
class="animate-fade-in animate-rotate-45 animation-timeline-scroll
|
|
725
|
+
animation-range-[25%_75%]:animate-fade-in"
|
|
726
|
+
></div>
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
A range Jumi cannot write is reported and dropped, and the motion it qualified still runs on the default
|
|
730
|
+
range. That matters most for a range that looks legal and is not: `normal` joined to an offset is dropped
|
|
731
|
+
by the engine without a word, so the warning is the only signal that the range you wrote is not the range
|
|
732
|
+
you got.
|
|
733
|
+
|
|
734
|
+
### Fallback
|
|
735
|
+
|
|
736
|
+
If the browser has no scroll-driven timelines, the animation falls back to the document timeline and runs
|
|
737
|
+
as a normal time-based animation. The motion and its final state are kept, so a view-driven entrance plays
|
|
738
|
+
on load instead of tracking entry. When you want scroll-driven or nothing, put both halves behind one
|
|
739
|
+
capability query:
|
|
740
|
+
|
|
741
|
+
```html
|
|
742
|
+
<div
|
|
743
|
+
class="supports-[animation-timeline:scroll()]:animate-fade-in
|
|
744
|
+
supports-[animation-timeline:scroll()]:animation-timeline-scroll"
|
|
745
|
+
></div>
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
Inside the query the pair applies together and the motion is scrubbed; outside it neither applies, so the
|
|
749
|
+
element keeps its base state and no motion runs.
|
|
750
|
+
|
|
751
|
+
On a scroll-driven animation the time controls are reinterpreted rather than ignored: 100% of the timeline
|
|
752
|
+
is the animation's own end, so `animation-delay` becomes a share of the scroll, and
|
|
753
|
+
`animation-iteration-count` divides the range. Reach for `animation-range` when you want to place a motion
|
|
754
|
+
deliberately, and reach for `animation-play-state-paused` when you want to stop one.
|
|
755
|
+
|
|
756
|
+
Note that a `while`-style timeline the page declares in `@keyframes`-adjacent CSS is not Jumi's business:
|
|
757
|
+
`animation-timeline-[--feed]` is how you consume one, and `scroll-timeline-name` is how you declare it.
|
|
758
|
+
|
|
759
|
+
---
|
|
760
|
+
|
|
761
|
+
## 11. View transitions
|
|
762
|
+
|
|
763
|
+
A view transition animates the browser's snapshot of an element rather than the element, so Jumi writes
|
|
764
|
+
the motion onto the generated pseudo-elements for you. Name the visual with the class:
|
|
765
|
+
|
|
766
|
+
```html
|
|
767
|
+
<div
|
|
768
|
+
class="view-transition-old/hero:animate-fade-out view-transition-new/hero:animate-fade-in"
|
|
769
|
+
>
|
|
770
|
+
hero
|
|
771
|
+
</div>
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
Measured, that emits `view-transition-name: hero` on the element and the motion on
|
|
775
|
+
`::view-transition-old(hero)`. The name after the slash is yours (`hero`, `my-card-2`, whatever the thing
|
|
776
|
+
is), and anything Jumi can animate works after the colon: an effect, a phrase, an arbitrary value.
|
|
777
|
+
|
|
778
|
+
```html
|
|
779
|
+
<div
|
|
780
|
+
class="view-transition-old/card:animate-scale-90 view-transition-new/card:animate-scale-110"
|
|
781
|
+
></div>
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
Either side on its own is fine. With only the incoming side, the outgoing side keeps the browser's own
|
|
785
|
+
cross-fade, which is usually what you want when the old state simply disappears.
|
|
786
|
+
|
|
787
|
+
The name is a **claim on the document**, not a label. The browser addresses a snapshot only by name, so a
|
|
788
|
+
candidate attaches its motion to whatever carries that name, including an element it has never seen.
|
|
789
|
+
Keep candidate names distinct from any `view-transition-name` you write yourself. Two elements sharing one
|
|
790
|
+
name is the same mistake in another form, and it fails differently: the browser refuses that transition
|
|
791
|
+
outright and reports a duplicate name rather than animating the wrong thing.
|
|
792
|
+
|
|
793
|
+
- Each side takes its own controls: `view-transition-old/hero:animation-duration-300`,
|
|
794
|
+
`view-transition-new/hero:animation-duration-500`. As everywhere else, a control without a motion on
|
|
795
|
+
that side does nothing.
|
|
796
|
+
- Conditional variants work and apply to the side they are written on.
|
|
797
|
+
- `motion-safe:` is honoured. `motion-reduce:` is reported rather than accepted, because Jumi has already
|
|
798
|
+
decided that its view transition motion does not run under reduced motion and the browser's cross-fade
|
|
799
|
+
is what remains.
|
|
800
|
+
- A name the browser will not accept, including the reserved words `none` and `auto`, is reported.
|
|
801
|
+
- A variant that depends on the element's own state, such as `hover:`, is reported: there is no element on
|
|
802
|
+
the other side for `:hover` to be about.
|
|
803
|
+
|
|
804
|
+
For a navigation between documents, the page opts in the way the platform requires and nothing else
|
|
805
|
+
changes:
|
|
806
|
+
|
|
807
|
+
```css
|
|
808
|
+
@view-transition {
|
|
809
|
+
navigation: auto;
|
|
810
|
+
}
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
---
|
|
814
|
+
|
|
815
|
+
## 12. Same-document transitions at runtime
|
|
816
|
+
|
|
817
|
+
Everything above is CSS. When the thing that moves is your own state (a card taking the corner, a panel
|
|
818
|
+
opening, a list reordering) the browser cannot see the change happen, so someone has to say when it is.
|
|
819
|
+
That half lives behind its own subpath, so the root package stays free of runtime code:
|
|
820
|
+
|
|
821
|
+
```ts
|
|
822
|
+
import { createViewTransition } from '@ibnlanre/jumi/view-transition'
|
|
823
|
+
|
|
824
|
+
const transition = createViewTransition()
|
|
825
|
+
|
|
826
|
+
transition.run(() => {
|
|
827
|
+
setActive('bravo')
|
|
828
|
+
})
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
The classes from section 11 style what happens next. Three rules govern the call:
|
|
832
|
+
|
|
833
|
+
1. **The callback must finish synchronously.** Do not `await` inside it, do not return a promise, and do
|
|
834
|
+
not wait for a frame. A promise handed to the browser is a pending callback, and awaiting a frame
|
|
835
|
+
inside one wedges the transition permanently: no capture, no animation, no error, and the change never
|
|
836
|
+
lands. Do asynchronous work first, then transition the result.
|
|
837
|
+
2. **Two calls while a transition is running are decided by when the second arrives.** A second call in
|
|
838
|
+
the same task is the same interaction twice, so your update runs and no second transition starts. A
|
|
839
|
+
second call in a later task, such as another click or a timer, is a new intention and supersedes the
|
|
840
|
+
one in flight. Override the policy only when you know something the timing does not:
|
|
841
|
+
`createViewTransition({ concurrency: 'coalesce' })` or `run(update, { concurrency: 'supersede' })`.
|
|
842
|
+
3. **The call resolves to an outcome instead of rejecting when the transition could not run.** Branch on
|
|
843
|
+
it when the difference matters.
|
|
844
|
+
|
|
845
|
+
| Result | Meaning |
|
|
846
|
+
| ------------------------------------------------ | -------------------------------------------------------- |
|
|
847
|
+
| `{ transitioned: true }` | The transition ran, with your change inside its boundary |
|
|
848
|
+
| `{ transitioned: false, reason: 'in-flight' }` | A duplicate call in the same interaction |
|
|
849
|
+
| `{ transitioned: false, reason: 'aborted' }` | Replaced or skipped before it animated |
|
|
850
|
+
| `{ transitioned: false, reason: 'hidden' }` | The document is in a background tab |
|
|
851
|
+
| `{ transitioned: false, reason: 'unsupported' }` | The browser has no view transitions |
|
|
852
|
+
|
|
853
|
+
Your update runs exactly once per call in every one of those cases: an outcome describes the animation,
|
|
854
|
+
never whether your change happened. Update errors and asynchronous callbacks reject rather than becoming
|
|
855
|
+
platform outcomes. For reusable operations, `transition.wrap(update, hooks)` keeps the update's argument
|
|
856
|
+
types, replaces its return value with the outcome promise, and gives each wrapped operation its own
|
|
857
|
+
lifecycle: `onTransitionStart`, `onTransitionEnd`, `onDecline(reason)` and `onError(error)`. Wrapping is
|
|
858
|
+
operation attribution, not invocation attribution: `open(true)` and `open(false)` may overlap and invoke
|
|
859
|
+
the same hooks, so treat the returned promise as each call's own channel.
|
|
860
|
+
|
|
861
|
+
A framework's setter does not necessarily commit the DOM synchronously, and Jumi cannot infer a rendering
|
|
862
|
+
schedule. In React, make the commit boundary explicit:
|
|
863
|
+
|
|
864
|
+
```ts
|
|
865
|
+
import { flushSync } from 'react-dom'
|
|
866
|
+
import { createViewTransition } from '@ibnlanre/jumi/view-transition'
|
|
867
|
+
|
|
868
|
+
const transition = createViewTransition()
|
|
869
|
+
const open = transition.wrap((next: boolean) => {
|
|
870
|
+
flushSync(() => setOpen(next))
|
|
871
|
+
})
|
|
872
|
+
|
|
873
|
+
await open(true)
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
---
|
|
877
|
+
|
|
878
|
+
## 13. Accessibility
|
|
879
|
+
|
|
880
|
+
Decorative motion should be optional, and the element should be readable when the motion is off.
|
|
881
|
+
|
|
882
|
+
```html
|
|
883
|
+
<div class="motion-safe:animate-fade-in-up">
|
|
884
|
+
Always readable. Animated when welcome.
|
|
885
|
+
</div>
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
Keep the base element visible: avoid an unconditional `opacity-0` or an off-screen transform that leaves
|
|
889
|
+
content hidden when the animation is disabled.
|
|
890
|
+
|
|
891
|
+
For continuous motion, the inverse variant is the one to reach for, because it strips the repetition only
|
|
892
|
+
for the visitors who asked for less:
|
|
893
|
+
|
|
894
|
+
```html
|
|
895
|
+
<div
|
|
896
|
+
class="animate-pulsing animation-iteration-count-infinite
|
|
897
|
+
motion-reduce:animation-iteration-count-1"
|
|
898
|
+
>
|
|
899
|
+
Pulses until you say otherwise.
|
|
900
|
+
</div>
|
|
901
|
+
```
|
|
902
|
+
|
|
903
|
+
There is no carrier class to switch off, so reducing motion across a surface means reaching the elements
|
|
904
|
+
themselves:
|
|
905
|
+
|
|
906
|
+
```css
|
|
907
|
+
@media (prefers-reduced-motion: reduce) {
|
|
908
|
+
*,
|
|
909
|
+
*::before,
|
|
910
|
+
*::after {
|
|
911
|
+
animation: none !important;
|
|
912
|
+
transition: none !important;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
Give persistent decorative movement a real pause control, labelled, with `aria-pressed`, and pause it the
|
|
918
|
+
same way:
|
|
919
|
+
|
|
920
|
+
```css
|
|
921
|
+
.motion-paused *,
|
|
922
|
+
.motion-paused *::before,
|
|
923
|
+
.motion-paused *::after {
|
|
924
|
+
animation-play-state: paused !important;
|
|
925
|
+
}
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
For exits, choose the final state explicitly, as in `motion-reduce:opacity-0` on an outgoing surface while
|
|
929
|
+
application code handles removal and focus. Do not apply a hidden base style to an entrance. Keep
|
|
930
|
+
essential information available without animation, avoid flashing and rapid repetition, give focus states
|
|
931
|
+
the same care as hover states, and test with reduced motion enabled as well as with motion paused.
|
|
932
|
+
|
|
933
|
+
---
|
|
934
|
+
|
|
935
|
+
## 14. Rules that separate a working answer from a broken one
|
|
936
|
+
|
|
937
|
+
1. **Controls configure, they never create.** If a control seems to do nothing, look for the motion first.
|
|
938
|
+
2. **Say which kind of motion you are writing.** Effect, property target, phrase, transition. Mixing the
|
|
939
|
+
mental models is what produces markup that compiles and does not move.
|
|
940
|
+
3. **One phrase per property per element.** A phrase owns its property; layering two on one property is
|
|
941
|
+
how you get one of them silently.
|
|
942
|
+
4. **Write pipes in phrases, never commas.**
|
|
943
|
+
5. **Name a motion with a word that is not a property**, and give each motion you want to time separately
|
|
944
|
+
its own word.
|
|
945
|
+
6. **Nest elements to layer motion.** An effect owns the properties it writes, and a second effect writing
|
|
946
|
+
the same property replaces it.
|
|
947
|
+
7. **Fill mode owns the end state.** The default `forwards` holds the final frame. `animation-fill-mode-none`
|
|
948
|
+
releases it, so a clip exit such as `diamond-out` or `mask-center` returns to the unclipped surface the
|
|
949
|
+
moment the animation ends.
|
|
950
|
+
8. **A one-shot animation runs when it is applied.** Replaying it means remounting the element or removing
|
|
951
|
+
and reapplying the class; it is not a function you call.
|
|
952
|
+
9. **Size effects read the containing block.** `expand-*` animates a percentage of the container, and
|
|
953
|
+
`typing` animates `width` from `0` to `100%` of it. Measured, a 46.7px line inside a 320px column is
|
|
954
|
+
fully visible at about 11% of the timeline, and the rest is invisible layout growth. Give the element a
|
|
955
|
+
shrink-wrapped parent (`inline-block`, or `width: fit-content`) and the animation ends exactly when the
|
|
956
|
+
last character appears.
|
|
957
|
+
10. **`accordion` has a ceiling.** It ramps `max-height` from 0 to 1000px through a 500px stop, so content
|
|
958
|
+
taller than 1000px stays at the ceiling and short content finishes early (measured, a 40px panel is
|
|
959
|
+
fully open at about 5% of the timeline). Size the ramp to the content, or use a reveal such as
|
|
960
|
+
`fade-in-up` when the height itself does not need to move.
|
|
961
|
+
11. **Clip entrances reach full coverage.** `diamond-in` and the `triangle-in` family grow past the corners,
|
|
962
|
+
so their final frame covers the whole box; the `-out` variants are exact reversals.
|
|
963
|
+
12. **`100%` in these effects is the container, not the content**, so give the container the dimensions the
|
|
964
|
+
motion should land on.
|
|
965
|
+
13. **Keyword sizes are opt-in.** `animate-width-auto` interpolates only with
|
|
966
|
+
`interpolate-size-allow-keywords`, which is inherited.
|
|
967
|
+
14. **Declare a motion path rather than animating from `none`**, or the element appears on the path halfway
|
|
968
|
+
through instead of easing onto it.
|
|
969
|
+
15. **Write complete class names**, or register the ones you assemble with `@source inline()`.
|
|
970
|
+
|
|
971
|
+
---
|
|
972
|
+
|
|
973
|
+
## 15. Troubleshooting
|
|
974
|
+
|
|
975
|
+
| Symptom | Cause | Fix |
|
|
976
|
+
| -------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
977
|
+
| The utilities exist in the CSS, nothing moves | Only the plugin is wired up; the finalizer never ran | Use `jumi()` from `/vite` or `/postcss`, or call `finalizeCss` after the CLI |
|
|
978
|
+
| One class seems missing from the stylesheet | The class is assembled from fragments, so the scanner never saw it | Write full class names, or list them in `@source inline("...")` |
|
|
979
|
+
| A phrase animates nothing, with no warning | Commas used as frame separators | Use pipes: `0:0\|100:1` |
|
|
980
|
+
| A phrase warns and does nothing | An offset outside 0 to 100 | Keep offsets in range; the warning names the offset |
|
|
981
|
+
| A duration or delay is ignored | Arbitrary values need a unit, and the motion must exist | `animation-duration-[800ms]`, and check the motion it should configure |
|
|
982
|
+
| A scoped control has no effect | The name addresses nothing on this element | Match the name to the motion, and remember property words belong to properties |
|
|
983
|
+
| Two effects fight or one disappears | Both write `transform`, `opacity` or `clip-path` | Nest elements, or combine them deliberately |
|
|
984
|
+
| A clip exit snaps back the moment it ends | `animation-fill-mode-none` released it | Keep the default `forwards`, or remove the element |
|
|
985
|
+
| An entrance does not play again | A one-shot animation runs when applied | Remount, or remove and reapply the class |
|
|
986
|
+
| `typing` reveals the text early, or never finishes | `100%` is the containing block's width, and the clip needs `overflow: hidden` + `nowrap` | Give it a shrink-wrapped parent |
|
|
987
|
+
| `accordion` cuts off content | Content taller than the 1000px ramp | Own keyframes, a taller-aware reveal, or no height motion |
|
|
988
|
+
| The list stagger only moves the first item | The animated elements are not direct children | Put the stagger parent next to them |
|
|
989
|
+
| A view transition does nothing | The name is duplicated in the document, or the browser declined it | Keep names unique, and read `reason` from the runtime outcome |
|
|
990
|
+
| A scroll-driven entrance plays on load | No scroll-driven timeline support, so it fell back to time | Guard both halves with `supports-[animation-timeline:scroll()]:` |
|
|
991
|
+
|
|
992
|
+
---
|
|
993
|
+
|
|
994
|
+
## 16. Where the rest lives
|
|
995
|
+
|
|
996
|
+
| Surface | Where |
|
|
997
|
+
| --------------------- | ------------------------------------------------------------------------- |
|
|
998
|
+
| Effects catalog | the site's `/effects/` page, and Appendix A here |
|
|
999
|
+
| Twelve guides | `docs/src/pages/docs/` in the repository |
|
|
1000
|
+
| Setup, in full | `docs/src/pages/docs/installation.md` and `build-step.md` |
|
|
1001
|
+
| Effective class names | the editor's autocomplete, since every utility is a real Tailwind utility |
|
|
1002
|
+
|
|
1003
|
+
---
|
|
1004
|
+
|
|
1005
|
+
## Appendix A: the 235 effect names, by family
|
|
1006
|
+
|
|
1007
|
+
Use these with the `animate-` prefix: `animate-fade-in`, `animate-zoom-in-elastic`, and so on.
|
|
1008
|
+
|
|
1009
|
+
- **accordion** (1): accordion
|
|
1010
|
+
- **arc** (4): arc-bottom-left, arc-bottom-right, arc-top-left, arc-top-right
|
|
1011
|
+
- **back** (5): back-in, back-in-down, back-in-left, back-in-right, back-in-up
|
|
1012
|
+
- **blinds** (4): blinds-in-x, blinds-in-y, blinds-out-x, blinds-out-y
|
|
1013
|
+
- **blink** (1): blink
|
|
1014
|
+
- **blur** (2): blur-in, blur-out
|
|
1015
|
+
- **bounce** (10): bounce-in, bounce-in-down, bounce-in-left, bounce-in-right, bounce-in-up, bounce-out, bounce-out-down, bounce-out-left, bounce-out-right, bounce-out-up
|
|
1016
|
+
- **bubble** (1): bubble
|
|
1017
|
+
- **circle** (10): circle-in, circle-in-bottom-left, circle-in-bottom-right, circle-in-top-left, circle-in-top-right, circle-out, circle-out-bottom-left, circle-out-bottom-right, circle-out-top-left, circle-out-top-right
|
|
1018
|
+
- **diamond** (2): diamond-in, diamond-out
|
|
1019
|
+
- **distort** (1): distort
|
|
1020
|
+
- **drip** (1): drip
|
|
1021
|
+
- **elastic** (1): elastic
|
|
1022
|
+
- **expand** (4): expand-down, expand-left, expand-right, expand-up
|
|
1023
|
+
- **explode** (1): explode
|
|
1024
|
+
- **fade** (10): fade-in, fade-in-down, fade-in-left, fade-in-right, fade-in-up, fade-out, fade-out-down, fade-out-left, fade-out-right, fade-out-up
|
|
1025
|
+
- **fall** (4): fall-down, fall-left, fall-right, fall-up
|
|
1026
|
+
- **figure** (1): figure-eight
|
|
1027
|
+
- **flicker** (1): flicker
|
|
1028
|
+
- **flip** (17): flip-card-x, flip-card-y, flip-diagonal, flip-in-bottom, flip-in-left, flip-in-right, flip-in-top, flip-in-x, flip-in-y, flip-wobble-x, flip-wobble-y, flip-x, flip-x-elastic, flip-y, flip-y-elastic, flip-zoom-x, flip-zoom-y
|
|
1029
|
+
- **floating** (1): floating
|
|
1030
|
+
- **fold** (2): fold-in, fold-out
|
|
1031
|
+
- **glitch** (1): glitch
|
|
1032
|
+
- **glow** (1): glow
|
|
1033
|
+
- **heart** (1): heart-beat
|
|
1034
|
+
- **hinge** (1): hinge-drop
|
|
1035
|
+
- **hue** (1): hue-shift
|
|
1036
|
+
- **implode** (1): implode
|
|
1037
|
+
- **jello** (1): jello
|
|
1038
|
+
- **letter** (2): letter-space-in, letter-space-out
|
|
1039
|
+
- **lift** (1): lift
|
|
1040
|
+
- **magnetic** (1): magnetic
|
|
1041
|
+
- **mask** (9): mask-bottom, mask-bottom-left, mask-bottom-right, mask-center, mask-left, mask-right, mask-top, mask-top-left, mask-top-right
|
|
1042
|
+
- **melt** (1): melt
|
|
1043
|
+
- **morph** (1): morph
|
|
1044
|
+
- **neon** (1): neon
|
|
1045
|
+
- **power** (2): power-off, power-on
|
|
1046
|
+
- **pulsing** (1): pulsing
|
|
1047
|
+
- **radial** (2): radial-wipe-in, radial-wipe-out
|
|
1048
|
+
- **reveal** (5): reveal-down, reveal-left, reveal-right, reveal-swipe, reveal-up
|
|
1049
|
+
- **ripple** (1): ripple
|
|
1050
|
+
- **rotate** (2): rotate-left, rotate-right
|
|
1051
|
+
- **rush** (8): rush-in-down, rush-in-left, rush-in-right, rush-in-up, rush-out-down, rush-out-left, rush-out-right, rush-out-up
|
|
1052
|
+
- **scatter** (1): scatter
|
|
1053
|
+
- **shadow** (1): shadow
|
|
1054
|
+
- **shake** (1): shake
|
|
1055
|
+
- **shimmer** (1): shimmer
|
|
1056
|
+
- **skew** (10): skew-down, skew-in, skew-left, skew-left-down, skew-left-up, skew-out, skew-right, skew-right-down, skew-right-up, skew-up
|
|
1057
|
+
- **slide** (17): slide-in-down, slide-in-down-elastic, slide-in-left, slide-in-right, slide-in-up, slide-in-up-elastic, slide-in-up-left, slide-in-up-right, slide-out-down, slide-out-left, slide-out-right, slide-out-up, slide-peek-down, slide-peek-left, slide-peek-right, slide-peek-up, slide-stack
|
|
1058
|
+
- **spinning** (1): spinning
|
|
1059
|
+
- **spiral** (6): spiral, spiral-back-in, spiral-back-out, spiral-in, spiral-out, spiral-path
|
|
1060
|
+
- **splash** (1): splash
|
|
1061
|
+
- **spring** (4): spring-down, spring-left, spring-right, spring-up
|
|
1062
|
+
- **square** (10): square-in, square-in-bottom-left, square-in-bottom-right, square-in-top-left, square-in-top-right, square-out, square-out-bottom-left, square-out-bottom-right, square-out-top-left, square-out-top-right
|
|
1063
|
+
- **swing** (1): swing
|
|
1064
|
+
- **tada** (1): tada
|
|
1065
|
+
- **throw** (4): throw-down, throw-left, throw-right, throw-up
|
|
1066
|
+
- **tilt** (1): tilt
|
|
1067
|
+
- **triangle** (10): triangle-in, triangle-in-bottom-left, triangle-in-bottom-right, triangle-in-top-left, triangle-in-top-right, triangle-out, triangle-out-bottom-left, triangle-out-bottom-right, triangle-out-top-left, triangle-out-top-right
|
|
1068
|
+
- **twist** (3): twist, twist-in, twist-out
|
|
1069
|
+
- **typing** (1): typing
|
|
1070
|
+
- **unfold** (2): unfold-x, unfold-y
|
|
1071
|
+
- **unmask** (9): unmask, unmask-bottom, unmask-bottom-left, unmask-bottom-right, unmask-left, unmask-right, unmask-top, unmask-top-left, unmask-top-right
|
|
1072
|
+
- **wave** (1): wave
|
|
1073
|
+
- **wiggle** (1): wiggle
|
|
1074
|
+
- **wobble** (1): wobble
|
|
1075
|
+
- **wobbling** (1): wobbling
|
|
1076
|
+
- **word** (1): word-slide
|
|
1077
|
+
- **zoom** (17): zoom-in, zoom-in-down, zoom-in-elastic, zoom-in-left, zoom-in-right, zoom-in-up, zoom-out, zoom-out-down, zoom-out-elastic, zoom-out-left, zoom-out-right, zoom-out-up, zoom-pulse, zoom-pulse-grow, zoom-pulse-shrink, zoom-tilt-in, zoom-tilt-out
|
|
1078
|
+
|
|
1079
|
+
## Appendix B: the 395 property stems
|
|
1080
|
+
|
|
1081
|
+
Every one of these takes the `animate-` prefix and a value: `animate-opacity-50`,
|
|
1082
|
+
`animate-background-position-x-offset-[10px]`. Names are the CSS property names, with part tokens added
|
|
1083
|
+
for compound values (`filter-blur`, `box-shadow-offset-x`, `border-image-slice-x`, `offset-anchor-x-edge`,
|
|
1084
|
+
`background-position-x-offset`, `contain-intrinsic-block-size`, `hyphenate-limit-chars-minimum-word-length`).
|
|
1085
|
+
|
|
1086
|
+
```text
|
|
1087
|
+
accent-color align-content align-items align-self alignment-baseline all appearance
|
|
1088
|
+
aspect-ratio aspect-ratio-height aspect-ratio-width backdrop-filter backdrop-filter-blur
|
|
1089
|
+
backdrop-filter-brightness backdrop-filter-contrast backdrop-filter-drop-shadow
|
|
1090
|
+
backdrop-filter-drop-shadow-blur backdrop-filter-drop-shadow-color
|
|
1091
|
+
backdrop-filter-drop-shadow-offset-x backdrop-filter-drop-shadow-offset-y
|
|
1092
|
+
backdrop-filter-grayscale backdrop-filter-hue-rotate backdrop-filter-invert
|
|
1093
|
+
backdrop-filter-opacity backdrop-filter-saturate backdrop-filter-sepia backdrop-filter-url
|
|
1094
|
+
backface-visibility background background-attachment background-blend-mode background-clip
|
|
1095
|
+
background-color background-image background-origin background-position background-position-x
|
|
1096
|
+
background-position-x-edge background-position-x-offset background-position-y
|
|
1097
|
+
background-position-y-edge background-position-y-offset background-repeat background-repeat-x
|
|
1098
|
+
background-repeat-y background-size background-size-height background-size-width block-size
|
|
1099
|
+
border border-block border-block-color border-block-end-radius border-block-end-width
|
|
1100
|
+
border-block-start-radius border-block-start-width border-block-width
|
|
1101
|
+
border-bottom-left-radius border-bottom-radius border-bottom-right-radius border-bottom-width
|
|
1102
|
+
border-collapse border-color border-end-end-radius border-end-start-radius border-image
|
|
1103
|
+
border-image-outset border-image-outset-bottom border-image-outset-left
|
|
1104
|
+
border-image-outset-right border-image-outset-top border-image-outset-x border-image-outset-y
|
|
1105
|
+
border-image-repeat border-image-repeat-x border-image-repeat-y border-inline-end-radius
|
|
1106
|
+
border-inline-end-width border-inline-start-radius border-inline-start-width
|
|
1107
|
+
border-inline-width border-left-radius border-left-width border-radius border-right-radius
|
|
1108
|
+
border-right-width border-start-end-radius border-start-start-radius border-top-left-radius
|
|
1109
|
+
border-top-radius border-top-right-radius border-top-width border-width bottom
|
|
1110
|
+
box-decoration-break box-shadow box-shadow-blur box-shadow-color box-shadow-offset-x
|
|
1111
|
+
box-shadow-offset-y box-shadow-spread box-sizing break-after break-before break-inside
|
|
1112
|
+
caption-side caret-color clear clip-path clip-rule color color-interpolation
|
|
1113
|
+
color-interpolation-filters color-scheme column-count column-fill column-gap column-rule
|
|
1114
|
+
column-rule-color column-rule-style column-rule-width column-span column-width columns
|
|
1115
|
+
contain contain-intrinsic-block-size contain-intrinsic-height contain-intrinsic-inline-size
|
|
1116
|
+
contain-intrinsic-size contain-intrinsic-width content content-visibility counter-increment
|
|
1117
|
+
counter-reset counter-set cursor cx cy d display display-inside display-outside
|
|
1118
|
+
dominant-baseline empty-cells fill fill-opacity fill-rule filter filter-blur
|
|
1119
|
+
filter-brightness filter-contrast filter-drop-shadow filter-drop-shadow-blur
|
|
1120
|
+
filter-drop-shadow-color filter-drop-shadow-offset-x filter-drop-shadow-offset-y
|
|
1121
|
+
filter-grayscale filter-hue-rotate filter-invert filter-opacity filter-saturate filter-sepia
|
|
1122
|
+
filter-url flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float
|
|
1123
|
+
flood-color flood-opacity font-family font-feature-settings font-kerning font-size
|
|
1124
|
+
font-size-adjust font-style font-synthesis font-synthesis-small-caps font-synthesis-style
|
|
1125
|
+
font-synthesis-weight font-variant font-variant-alternates font-variant-caps
|
|
1126
|
+
font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position
|
|
1127
|
+
font-variation-settings font-weight forced-color-adjust gap grid grid-auto-columns
|
|
1128
|
+
grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-start grid-row
|
|
1129
|
+
grid-row-end grid-row-start grid-template-areas grid-template-columns grid-template-rows
|
|
1130
|
+
hanging-punctuation height hyphenate-character hyphenate-limit-chars
|
|
1131
|
+
hyphenate-limit-chars-minimum-characters-after
|
|
1132
|
+
hyphenate-limit-chars-minimum-characters-before hyphenate-limit-chars-minimum-word-length
|
|
1133
|
+
hyphens image-orientation image-rendering initial-letter inline-size inset inset-block
|
|
1134
|
+
inset-block-end inset-block-start inset-inline inset-inline-end inset-inline-start
|
|
1135
|
+
justify-content justify-items justify-self left letter-spacing lighting-color line-break
|
|
1136
|
+
line-clamp line-height list-style list-style-image list-style-position list-style-type margin
|
|
1137
|
+
margin-block margin-block-end margin-block-start margin-bottom margin-inline
|
|
1138
|
+
margin-inline-end margin-inline-start margin-left margin-right margin-top marker marker-end
|
|
1139
|
+
marker-mid marker-start mask mask-border mask-border-mode mask-border-outset
|
|
1140
|
+
mask-border-outset-bottom mask-border-outset-left mask-border-outset-right
|
|
1141
|
+
mask-border-outset-top mask-border-outset-x mask-border-outset-y mask-border-repeat
|
|
1142
|
+
mask-border-slice mask-border-slice-bottom mask-border-slice-left mask-border-slice-right
|
|
1143
|
+
mask-border-slice-top mask-border-slice-x mask-border-slice-y mask-border-source
|
|
1144
|
+
mask-border-width mask-clip mask-composite mask-image mask-mode mask-origin mask-position
|
|
1145
|
+
mask-repeat mask-size mask-type math-depth math-depth-add math-style max-block-size
|
|
1146
|
+
max-height max-inline-size max-width min-block-size min-height min-inline-size min-width
|
|
1147
|
+
mix-blend-mode object-fit object-position object-position-x object-position-x-edge
|
|
1148
|
+
object-position-x-offset object-position-y object-position-y-edge object-position-y-offset
|
|
1149
|
+
offset offset-anchor offset-anchor-x-edge offset-anchor-y-edge offset-distance offset-path
|
|
1150
|
+
offset-position offset-position-x offset-position-x-edge offset-position-x-offset
|
|
1151
|
+
offset-position-y offset-position-y-edge offset-position-y-offset offset-rotate opacity order
|
|
1152
|
+
orphans outline outline-color outline-offset outline-style outline-width overflow
|
|
1153
|
+
overflow-anchor overflow-block overflow-clip-margin overflow-inline overflow-wrap overflow-x
|
|
1154
|
+
overflow-y overscroll-behavior overscroll-behavior-block overscroll-behavior-inline
|
|
1155
|
+
overscroll-behavior-x overscroll-behavior-y padding padding-block padding-block-end
|
|
1156
|
+
padding-block-start padding-bottom padding-inline padding-inline-end padding-inline-start
|
|
1157
|
+
padding-left padding-right padding-top page paint-order perspective perspective-origin
|
|
1158
|
+
position right rotate rotate-3d rotate-angle rotate-x rotate-y rotate-z row-gap scale scale-x
|
|
1159
|
+
scale-y scale-z skew skew-x skew-y stroke stroke-dasharray stroke-dashoffset stroke-width
|
|
1160
|
+
text-align text-shadow text-shadow-blur text-shadow-color text-shadow-offset-x
|
|
1161
|
+
text-shadow-offset-y top transform transform-origin transform-origin-x transform-origin-y
|
|
1162
|
+
transform-origin-z transform-style translate translate-3d translate-x translate-y translate-z
|
|
1163
|
+
visibility width x y z-index
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1166
|
+
## Appendix C: easing names, and the other keyword scales
|
|
1167
|
+
|
|
1168
|
+
Timing functions, for `animation-timing-function-*` and `transition-timing-function-*`:
|
|
1169
|
+
|
|
1170
|
+
```text
|
|
1171
|
+
linear, ease, ease-in, ease-out, ease-in-out, step-start, step-end,
|
|
1172
|
+
ease-in-quad, ease-out-quad, ease-in-out-quad, ease-in-cubic, ease-out-cubic, ease-in-out-cubic,
|
|
1173
|
+
ease-in-quart, ease-out-quart, ease-in-out-quart, ease-in-quint, ease-out-quint, ease-in-out-quint,
|
|
1174
|
+
ease-in-sine, ease-out-sine, ease-in-out-sine, ease-in-circ, ease-out-circ, ease-in-out-circ,
|
|
1175
|
+
ease-in-expo, ease-out-expo, ease-in-out-expo, ease-in-back, ease-out-back, ease-in-out-back,
|
|
1176
|
+
ease-entrance, ease-exit, ease-exit-sharp, ease-smooth, ease-bounce-out, ease-elastic
|
|
1177
|
+
```
|
|
1178
|
+
|
|
1179
|
+
Other scales, for the controls that take them:
|
|
1180
|
+
|
|
1181
|
+
```text
|
|
1182
|
+
direction normal, reverse, alternate, alternate-reverse
|
|
1183
|
+
fill mode none, forwards, backwards, both
|
|
1184
|
+
play state running, paused
|
|
1185
|
+
composition replace, add, accumulate
|
|
1186
|
+
iterations 1 through 10, infinite, or any number
|
|
1187
|
+
timeline auto, none, scroll, view, [--your-timeline]
|
|
1188
|
+
timeline scroller nearest, root, self
|
|
1189
|
+
timeline axis block, inline, x, y
|
|
1190
|
+
range names entry, exit, contain, cover, entry-crossing, exit-crossing
|
|
1191
|
+
transition behavior normal, allow-discrete
|
|
1192
|
+
interpolate size allow-keywords, numeric-only
|
|
1193
|
+
animation name none
|
|
1194
|
+
```
|