diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-06 12:06:27 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-06 12:06:27 +0800 |
| commit | 1b37f7d7f1554f4ef4cd185c1181d54d9956b1db (patch) | |
| tree | 54057c5cee90f3a93b240d77828f14f90af8c93f /snippets/css_transition_common | |
| parent | a9386c536189f2aaf38c9e2ba674a096657ca366 (diff) | |
Update
Diffstat (limited to 'snippets/css_transition_common')
| -rw-r--r-- | snippets/css_transition_common | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/snippets/css_transition_common b/snippets/css_transition_common new file mode 100644 index 0000000..4884c90 --- /dev/null +++ b/snippets/css_transition_common | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | @media (prefers-reduced-motion: no-preference) { | ||
| 2 | transition: | ||
| 3 | opacity .5s ease-in, | ||
| 4 | scale .5s ease-in, | ||
| 5 | display .5s ease-in; | ||
| 6 | height .5s ease-in; | ||
| 7 | transition-behavior: allow-discrete; | ||
| 8 | } | ||
| 9 | |||
| 10 | @starting-style { | ||
| 11 | opacity: 0; | ||
| 12 | scale: 1.1; | ||
| 13 | } | ||
| 14 | |||
| 15 | &[hidden] { | ||
| 16 | opacity: 0; | ||
| 17 | scale: .9; | ||
| 18 | display: none !important; | ||
| 19 | transition-duration: .4s; | ||
| 20 | transition-timing-function: ease-out; | ||
| 21 | } | ||