diff options
| author | Fuwn <[email protected]> | 2026-05-15 11:10:35 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-05-15 11:10:35 +0000 |
| commit | 963d635621c0a466c2f6d5e3d65f601185975201 (patch) | |
| tree | 93aa369670ff9944df82ad2300096280e7c3fab2 /src | |
| parent | perf(images): lazy-load and async-decode off-screen imagery (diff) | |
| download | due.moe-963d635621c0a466c2f6d5e3d65f601185975201.tar.xz due.moe-963d635621c0a466c2f6d5e3d65f601185975201.zip | |
perf(transitions): narrow the universal * selector
Replace the * { transition: color/bg/border/shadow } rule with a
:where() list of the surfaces that actually receive state changes
(anchors, buttons, form controls, cards, details/summary, role=button,
role=menuitem, role=option). Every element no longer pays the
transition (especially box-shadow, the costly one) on theme switch or
parent re-paint.
Diffstat (limited to 'src')
| -rw-r--r-- | src/styles/colours.css | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/styles/colours.css b/src/styles/colours.css index eadd0c91..0442fee4 100644 --- a/src/styles/colours.css +++ b/src/styles/colours.css @@ -42,7 +42,19 @@ } } -* { +:where( + a, + button, + input, + select, + textarea, + details, + summary, + .card, + [role="button"], + [role="menuitem"], + [role="option"] +) { transition: color var(--duration-fast) var(--ease-in-out-quart), background-color var(--duration-fast) var(--ease-in-out-quart), |