aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-05-15 11:10:35 +0000
committerFuwn <[email protected]>2026-05-15 11:10:35 +0000
commit963d635621c0a466c2f6d5e3d65f601185975201 (patch)
tree93aa369670ff9944df82ad2300096280e7c3fab2 /src
parentperf(images): lazy-load and async-decode off-screen imagery (diff)
downloaddue.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.css14
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),