Skip to content

fix(docs): remove double borders and fix column alignment on landing page tables#369

Merged
betegon merged 1 commit intomainfrom
fix/docs-table-borders-alignment
Mar 6, 2026
Merged

fix(docs): remove double borders and fix column alignment on landing page tables#369
betegon merged 1 commit intomainfrom
fix/docs-table-borders-alignment

Conversation

@betegon
Copy link
Member

@betegon betegon commented Mar 6, 2026

Summary

Fixes the ASCII art tables on the landing page that had double borders (CSS border on top of box-drawing characters) and misaligned column headers. The root cause was twofold: global pre styling rules adding unwanted borders/padding, and Astro's smartypants converting '' and ... inside <pre> blocks which broke monospace alignment.

Changes

  • Excluded .table-box from two global pre border rules in custom.css
  • Added a dedicated pre.table-box reset that strips background, border, padding, and margin
  • Forced system monospace fonts with normalized glyph metrics on all table-box children to guarantee consistent column alignment across browsers
  • Disabled markdown.smartypants in astro.config.mjs to prevent character substitution that breaks monospace column widths

Test plan

  • Check the landing page (/) — both Terminal and FeatureTerminal tables should have no CSS border, only ASCII box-drawing borders
  • Verify column headers align with data rows and separator lines
  • Check on mobile viewport (~375px) — same alignment checks
  • Verify code blocks on other pages (e.g. /getting-started/) still have their border styling

…page tables

The ASCII art tables in Terminal and FeatureTerminal components were
getting unwanted CSS borders from global `pre` rules, and column headers
were misaligned due to Astro's smartypants converting quotes/ellipsis
and JetBrains Mono rendering box-drawing characters at inconsistent widths.

- Exclude `.table-box` from global pre border rules
- Add dedicated pre.table-box styles that strip all chrome
- Force system monospace font with consistent glyph metrics on all
  table-box children to guarantee column alignment
- Disable markdown smartypants to prevent character substitution inside
  pre blocks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Add response caching for read-only API calls by BYK in #330

Bug Fixes 🐛

  • (docs) Remove double borders and fix column alignment on landing page tables by betegon in #369

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/pr-preview/pr-369/

Built to branch gh-pages at 2026-03-06 19:13 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Codecov Results 📊

104 passed | Total: 104 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 4092 uncovered lines.
✅ Project coverage is 80.78%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    80.78%    80.78%        —%
==========================================
  Files          131       131         —
  Lines        21291     21291         —
  Branches         0         0         —
==========================================
+ Hits         17199     17199         —
- Misses        4092      4092         —
- Partials         0         0         —

Generated by Codecov Action

@betegon betegon merged commit 2c66a6b into main Mar 6, 2026
21 checks passed
@betegon betegon deleted the fix/docs-table-borders-alignment branch March 6, 2026 19:16
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

text-decoration: none !important;
text-transform: none !important;
-webkit-text-size-adjust: none !important;
}
Copy link

Choose a reason for hiding this comment

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

Wildcard !important overrides alias-hl bold and underline styling

Medium Severity

The pre.table-box * rule sets font-weight: 400 !important and text-decoration: none !important, which overrides the .alias-hl class styling (font-weight: 700 and text-decoration: underline) defined in both Terminal.astro and FeatureTerminal.astro. Since .alias-hl spans are children of pre.table-box, the wildcard selector matches them and the !important wins, silently removing the bold+underline highlighting on alias characters in the tables.

Additional Locations (1)

Fix in Cursor Fix in Web

pre.table-box,
pre.table-box * {
font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace !important;
font-size: inherit !important;
Copy link

Choose a reason for hiding this comment

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

Wildcard !important overrides intentional table font-size 0.7rem

Medium Severity

The pre.table-box and pre.table-box * rules set font-size: inherit !important, overriding the intentional font-size: 0.7rem defined for .table-box and .header-text in both Terminal.astro and FeatureTerminal.astro. The table text will inherit the parent's larger font-size (e.g., 0.8rem from .terminal-body), making the ASCII art tables bigger than designed, which could itself break the column alignment this PR aims to fix.

Fix in Cursor Fix in Web

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.

1 participant