fix(css): give the install command its own top margin - #7
Merged
Conversation
`.cmd` set only `margin-bottom`. Its top spacing came from `.iface` (`margin: 16px 0 4px`), which wraps it on indexes whose plugin declares an interface line. An index that declares none -- dsh-index is one; its packages are config layers, not things you import -- renders the install command directly after `.lede`, whose own margin is `6px 0 0`. With no margin between them the description and the command run together as one block, which is what a reader of that page reported. The command now owns its top margin. Consecutive commands stay tight at 6px, and inside `.iface` the wrapper still supplies the gap, so no existing layout moves.
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
.cmdset onlymargin-bottom: 6px. Its top spacing came from.iface(margin: 16px 0 4px), the wrapper used on indexes whose plugin declares an interface line.An index that declares none renders the install command directly after
.lede(margin: 6px 0 0). With neither element contributing a margin between them, the description and the command touch:That is a reader's report from dsh-index, whose packages are config layers rather than things you import, so no interface line is ever declared there.
Change
The command owns its top margin instead of borrowing an ancestor's.
Test plan
python3 -m pytest tests/ -q→ 45 passed (CSS-only change; no test asserts on spacing)..iface .cmdkeeps itsmargin-top: 0..cmd + .cmd.