-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.css
More file actions
70 lines (63 loc) · 1.99 KB
/
example.css
File metadata and controls
70 lines (63 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* ===========================================================
PHASE CLASSES (umbrella defaults)
Style these for animation that's uniform across all actions
of a phase. Most apps only need this layer.
=========================================================== */
.turbo-stream-enter {
animation: turbo-stream-enter 200ms ease-out;
}
@keyframes turbo-stream-enter {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}
.turbo-stream-change {
animation: turbo-stream-change 800ms ease-out;
}
@keyframes turbo-stream-change {
from { background-color: #FFF3CD; }
to { background-color: inherit; }
}
.turbo-stream-exit {
animation: turbo-stream-exit 200ms ease-out forwards;
}
@keyframes turbo-stream-exit {
from { opacity: 1; transform: translateX(0); }
to { opacity: 0; transform: translateX(-25%); }
}
/* ===========================================================
ACTION CLASSES (per-action overrides)
Uncomment / customize these to differentiate behavior between
actions within the same phase. They override the phase class
above thanks to source order; CSS specificity is otherwise equal.
=========================================================== */
/* Example: prepended items slide down from above instead of fading. */
/*
.turbo-stream-prepend {
animation: slide-down-in 200ms ease-out;
}
@keyframes slide-down-in {
from { opacity: 0; transform: translateY(-100%); }
to { opacity: 1; transform: translateY(0); }
}
*/
/* Example: replace does a crossfade, update just flashes yellow. */
/*
.turbo-stream-replace {
animation: turbo-stream-enter 250ms ease-out;
}
*/
@media (prefers-reduced-motion: reduce) {
.turbo-stream-enter,
.turbo-stream-change,
.turbo-stream-exit,
.turbo-stream-append,
.turbo-stream-prepend,
.turbo-stream-before,
.turbo-stream-after,
.turbo-stream-replace,
.turbo-stream-update,
.turbo-stream-remove {
animation-duration: 1ms;
animation-iteration-count: 1;
}
}