Skip to content

Fix vertical alignment in audits tables - #2774

Closed
leighmcculloch wants to merge 1 commit into
mainfrom
fix/audits-table-vertical-alignment
Closed

Fix vertical alignment in audits tables#2774
leighmcculloch wants to merge 1 commit into
mainfrom
fix/audits-table-vertical-alignment

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Aug 20, 2026

Copy link
Copy Markdown
Member

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

  1. In soroban-sdk.mdx the Report text 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 default vertical-align: middle) sat centered in the row.
  2. The .audits-table vertical 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.
  • Removed the asymmetric padding-top / padding-bottom overrides; all body rows now use the symmetric Infima default (12px).
  • Kept the grouping rules (no borders inside a group, ↳ arrow, stripes); dropped the no-op 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.

Copilot AI balanced review requested due to automatic review settings August 20, 2026 02:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@stellar-jenkins-ci

Copy link
Copy Markdown

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.

2 participants