Repository navigation
Fix: draw a settings separator only between rows that are visible - #19
Merged
Merged
Conversation
The exemption was .row:last-child, which asks about position in the DOM. The Security group ends with two rows that stay hidden until password protection is on, so the exemption landed on a hidden row and Password Protection drew a border under itself with nothing beneath it. A selector cannot see an inline display, so the four rows that hide now carry d-none and the seven places that toggled them set the class. The rule asks whether any later row is visible, which also makes the drow copy of it redundant.
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
.row:last-child{border-bottom:none}with.row:not(:has(~ .row:not(.d-none))){border-bottom:none}, so the exemption follows the last row the user can actually see.#ie-pw,#sec-revoke-row,#ie-socket,#srv-hide-healthy-row) with the existing.d-noneclass instead ofstyle="display:none", and switch the sevenstyle.displaytoggles inadmin.jsandadmin-settings.jstoclassList.toggle('d-none', …). A selector cannot see an inline style, so this is what makes the rule answerable..row.drow:last-child{border-bottom:none}: the new rule covers it, and the drag ghost is appended todocument.bodyrather than as a sibling, so it cannot affect the list.:has()is Safari 15.4, inside the documented 16.2 floor.Why not the one-line version:
.row + .row { border-top }would fix Security, but leaves a stray border if a group's first row is ever the hidden one. This asks the real question instead.Testing
All green: 1055 backend, 553 frontend, lint, format, both typechecks, cache-busting check. Added 4 tests covering the rule, the markup, the JS toggles and the
.d-nonedefinition; mutation-checked all three halves by restoring the:last-childrule, hiding a row inline, and reverting a JS toggle.Checklist