fix: keep [hidden] elements hidden regardless of later display rules#55
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.hint { display: block }and the browser's default[hidden] { display: none }have equal CSS specificity, and.hintcomes later in the stylesheet — so it always won and thehiddenattribute was ignored.[hidden] { display: none !important; }rule so any element'shiddenattribute is honored regardless of laterdisplayrules..modal-overlay[hidden] { display: none }workaround, which was already patching the exact same underlying issue for one element.Test plan
ruff check src tests— passesruff format --check src tests— passescurl .../styles.cssshows the rule).modal-overlay[hidden]rule)🤖 Generated with Claude Code