Skip to content

fix: keep [hidden] elements hidden regardless of later display rules#55

Merged
bin101 merged 1 commit into
mainfrom
fix/stats-loading-indicator
Jul 9, 2026
Merged

fix: keep [hidden] elements hidden regardless of later display rules#55
bin101 merged 1 commit into
mainfrom
fix/stats-loading-indicator

Conversation

@bin101

@bin101 bin101 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • The "Loading…" hint under Run Statistics never disappeared once the stats had loaded, because .hint { display: block } and the browser's default [hidden] { display: none } have equal CSS specificity, and .hint comes later in the stylesheet — so it always won and the hidden attribute was ignored.
  • Added a global [hidden] { display: none !important; } rule so any element's hidden attribute is honored regardless of later display rules.
  • Removed the now-redundant per-component .modal-overlay[hidden] { display: none } workaround, which was already patching the exact same underlying issue for one element.

Test plan

  • ruff check src tests — passes
  • ruff format --check src tests — passes
  • Confirmed via a running instance that the new CSS rule is served correctly (curl .../styles.css shows the rule)
  • Manual: open the app, go to the Statistik tab — "Lade…" should show briefly then disappear once the cards are populated
  • Manual: open/close the athlete-search modal — should still show/hide correctly (regression check for the removed .modal-overlay[hidden] rule)

🤖 Generated with Claude Code

The "Loading…" hint on the Stats tab (and any other .hint-styled
status message) never disappeared because `.hint { display: block }`
has the same specificity as the browser's default `[hidden] {
display: none }` and comes later in the stylesheet, so it always won.
Add a global `[hidden] { display: none !important; }` rule so the
attribute is honored everywhere, and drop the now-redundant
per-component `.modal-overlay[hidden]` workaround it replaces.
@bin101
bin101 merged commit a11c022 into main Jul 9, 2026
1 check passed
@bin101
bin101 deleted the fix/stats-loading-indicator branch July 9, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant