Skip to content

Commit 2c66a6b

Browse files
betegonclaude
andauthored
fix(docs): remove double borders and fix column alignment on landing page tables (#369)
## 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 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c8d714f commit 2c66a6b

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

docs/astro.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ const base = process.env.DOCS_BASE_PATH || "/";
88
export default defineConfig({
99
site: "https://cli.sentry.dev",
1010
base,
11+
markdown: {
12+
smartypants: false,
13+
},
1114
integrations: [
1215
sentry({
1316
project: "cli-website",

docs/src/styles/custom.css

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ starlight-tabs [role="tabpanel"] {
913913
Code Blocks
914914
========================================================================== */
915915

916-
pre:not(.pm-pre) {
916+
pre:not(.pm-pre):not(.table-box) {
917917
background: rgba(20, 20, 25, 0.9) !important;
918918
border: 1px solid rgba(255, 255, 255, 0.08) !important;
919919
border-radius: 12px !important;
@@ -929,6 +929,32 @@ pre.pm-pre,
929929
padding: 0 !important;
930930
}
931931

932+
/* ASCII art tables inside terminals - no chrome, consistent monospace */
933+
pre.table-box {
934+
background: transparent !important;
935+
border: none !important;
936+
border-radius: 0 !important;
937+
margin: 0 !important;
938+
padding: 0 !important;
939+
}
940+
941+
pre.table-box,
942+
pre.table-box * {
943+
font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace !important;
944+
font-size: inherit !important;
945+
font-weight: 400 !important;
946+
font-style: normal !important;
947+
font-variant: normal !important;
948+
font-variant-ligatures: none !important;
949+
font-feature-settings: normal !important;
950+
font-stretch: normal !important;
951+
letter-spacing: 0 !important;
952+
word-spacing: 0 !important;
953+
text-decoration: none !important;
954+
text-transform: none !important;
955+
-webkit-text-size-adjust: none !important;
956+
}
957+
932958
code {
933959
font-family: var(--sl-font-mono);
934960
font-size: 0.9em;
@@ -1089,7 +1115,7 @@ code {
10891115
}
10901116

10911117
/* Standalone pre */
1092-
.sl-markdown-content pre:not(.expressive-code pre):not(.pm-pre) {
1118+
.sl-markdown-content pre:not(.expressive-code pre):not(.pm-pre):not(.table-box) {
10931119
background: #0a0a0f !important;
10941120
border: 1px solid rgba(255, 255, 255, 0.1) !important;
10951121
border-radius: 12px !important;

0 commit comments

Comments
 (0)