From 1362f00d39e90aef8a8338887222541a5a992178 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Feb 2026 21:52:21 +0000 Subject: Fix theme performance regressions affecting mobile scroll The new theme CSS files introduced several patterns that cause scroll jank and memory pressure, especially on mobile: - terminal.css: Full-viewport fixed pseudo-element with repeating gradient scanlines forced GPU compositing on every scroll frame. Now limited to desktop only with will-change layer promotion. - codex.css/sakura.css: text-rendering: optimizeLegibility on body triggered expensive kerning/ligature computation on all text. - codex.css: font-feature-settings forced text shaper on every glyph. - codex.css: hyphens: auto required dictionary lookups during layout. - style.css: transition: all on buttons and sidebar links caused unnecessary animation work during scroll hover state changes. - main.ts: checkReadItems did O(n) individual querySelector calls per scroll tick; switched to single querySelectorAll batch query. - Polling interval reduced from 1s to 3s (scroll handler already covers the normal case, polling is just a robustness fallback). https://claude.ai/code/session_0187FXrbScDSWfbNEk9SfJaj --- frontend-vanilla/src/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend-vanilla/src/style.css') diff --git a/frontend-vanilla/src/style.css b/frontend-vanilla/src/style.css index 0f7b909..fd51eff 100644 --- a/frontend-vanilla/src/style.css +++ b/frontend-vanilla/src/style.css @@ -163,7 +163,7 @@ html { padding: 0.3rem 0.8rem; margin: 0.1rem 0; border-radius: 8px; - transition: all 0.2s ease; + transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; font-weight: 500; font-size: 0.85rem; /* Explicitly smaller sidebar links */ @@ -703,7 +703,7 @@ button, font-family: var(--font-heading); background-color: var(--bg-color); cursor: pointer; - transition: all 0.2s; + transition: background-color 0.2s, color 0.2s, border-color 0.2s; color: var(--text-color); text-decoration: none; display: inline-block; -- cgit v1.2.3