feat(blog): add table styles to layout and enhance token savings post

Add global CSS rules for markdown tables in BlogPost.astro including
borders, padding, and row hover states. Update the token savings
breakdown table to use an improved format with visual impact scales.
This commit is contained in:
2026-02-28 10:19:03 +01:00
parent 4f97a17ef3
commit cb77a5e7d8
2 changed files with 37 additions and 7 deletions
+7 -7
View File
@@ -38,13 +38,13 @@ Input tokens dropped from **15.08M to 10.41M**, which is a reduction of **4,676,
To provide full transparency, here is the breakdown across all 5 runs: To provide full transparency, here is the breakdown across all 5 runs:
| Run | Naive Input | Compressed Input | Savings | | Run | 🟢 Naive Input | 🔵 Compressed Input | Savings | Impact Scale |
| --- | ----------- | ---------------- | ------- | | :-- | :------------- | :----------------- | :------ | :----------- |
| 1 | 3.59M | 2.16M | 40% | | **1** | 3.59M | 2.16M | **40%** | `████████░░` |
| 2 | 3.22M | 1.66M | 48% | | **2** | 3.22M | 1.66M | **48%** | `█████████░` |
| 3 | 2.15M | 2.23M | -3% | | **3** | 2.15M | 2.23M | **-3%** | `⚠️ lean run` |
| 4 | 2.95M | 1.66M | 44% | | **4** | 2.95M | 1.66M | **44%** | `█████████░` |
| 5 | 3.15M | 2.68M | 15% | | **5** | 3.15M | 2.68M | **15%** | `███░░░░░░░` |
On average across all runs, this resulted in **≈ 31% lower total token cost across the full test set**. On average across all runs, this resulted in **≈ 31% lower total token cost across the full test set**.
+30
View File
@@ -195,4 +195,34 @@ const { post } = Astro.props;
color: var(--color-text-secondary); color: var(--color-text-secondary);
font-style: italic; font-style: italic;
} }
.post-content :global(table) {
width: 100%;
border-collapse: collapse;
margin: var(--space-xl) 0;
font-size: 0.95rem;
font-family: var(--font-mono);
}
.post-content :global(th) {
text-align: left;
padding: var(--space-sm) var(--space-md);
border-bottom: 2px solid var(--color-border);
color: var(--color-text);
font-weight: 600;
}
.post-content :global(td) {
padding: var(--space-sm) var(--space-md);
border-bottom: 1px solid var(--color-border);
color: var(--color-text-secondary);
}
.post-content :global(tr:last-child td) {
border-bottom: none;
}
.post-content :global(tr:hover td) {
background: var(--color-bg-elevated);
}
</style> </style>