forge
Clone
https://git.tahinli.com/Tahinli/forge.git
0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits
| 1 | // Motion for what the reader does: a button they press, a menu they open, a stepper they click, the |
| 2 | // banner they dismiss. The classes below are added by nav.js on the reader's own action, never on a |
| 3 | // live re-render, so a page that updates itself does not move on its own. Inline disclosures slide in |
| 4 | // nav.js (slideDetails). Individual `translate` and `scale` are used, so a panel placed with |
| 5 | // `transform` keeps its place. |
| 6 | |
| 7 | $ease-out: cubic-bezier(0.2, 0, 0, 1); |
| 8 | |
| 9 | // A press sinks the button a little. |
| 10 | .button, |
| 11 | button { |
| 12 | |
| 13 | &:active:not(:disabled) { |
| 14 | scale: 0.97; |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | // A stepper's number flashes the accent when a click moves it. |
| 19 | input.tick { |
| 20 | animation: tick 0.3s ease-out; |
| 21 | } |
| 22 | |
| 23 | @keyframes tick { |
| 24 | from { |
| 25 | color: var(--accent); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | @media (prefers-reduced-motion: reduce) { |
| 30 | .button, |
| 31 | button { |
| 32 | |
| 33 | &:active:not(:disabled) { |
| 34 | scale: none; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | details.pop[open] > :not(summary), |
| 39 | input.tick { |
| 40 | animation: none; |
| 41 | } |
| 42 | } |