Fix vertical alignment in audits tables - #2774
Closed
leighmcculloch wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates audit-table styling to restore uniform row heights and vertical alignment.
Changes:
- Removes asymmetric cell padding.
- Normalizes MDX-generated paragraphs inside report links.
- Preserves audit grouping, borders, arrows, and stripes.
Recommendation: MERGE-READY — the CSS-only fix is scoped and consistent with the stated verification.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Preview is available here: |
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.
Follow-up to #2737. On the audits pages, every "Report" link sat ~10px above its version badge and the rows had uneven heights.
Root causes
soroban-sdk.mdxtheReporttext sits on its own line inside the<a>, so MDX renders it as a block<p>. The<p>'s 20px bottom margin inflated every row and top-anchored the link text, while the version<code>badge (Infima's defaultvertical-align: middle) sat centered in the row..audits-tablevertical padding overrides were asymmetric (main row 12px top / 2.4px bottom, sub rows 2.4/2.4, last row 2.4/12), which with centered cells produced uneven row heights (61.8 / 51.2 / 51.2 / 51.2 / 61.3px) and off-center content in the first and last rows.The mdx can't be "fixed" by putting the link text on one line — Prettier (
printWidth: 80) re-splits the long hrefs, re-triggering the<p>. So this is a CSS-only change.Changes (
src/css/custom.scss).audits-table a > p { display: inline; margin: 0 }— neutralizes the MDX-injected<p>so link cells behave like plain inline links, whatever the source formatting is.padding-top/padding-bottomoverrides; all body rows now use the symmetric Infima default (12px).tr.sub { border-top: 0 }.Verified
Rendered the page on the local dev server and measured the table geometry in-browser: rows are now uniform (51.9 / 51.4 / 51.4 / 51.4 / 51.4px, previously 61.8 / 51.2 / 51.2 / 51.2 / 61.3px) and the badge, auditor, and report link are vertically centered in every row. Checked light and dark themes; the audits page passes the Prettier check.