Skip to content

Commit a00d791

Browse files
committed
Re-vendor boostlook markdown card fixes
1 parent 644cd19 commit a00d791

1 file changed

Lines changed: 39 additions & 14 deletions

File tree

static/css/v3/boostlook-v3.css

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5668,9 +5668,19 @@ html.v3 .boostlook {
56685668
}
56695669

56705670
.boostlook.markdown-content li {
5671+
margin-top: var(--space-medium);
5672+
}
5673+
5674+
/* The container's flex `gap` already spaces the list from a preceding block,
5675+
so the first item shouldn't add its own top margin on top of it. */
5676+
.boostlook.markdown-content li:first-child {
5677+
margin-top: 0;
5678+
}
5679+
5680+
/* Unordered lists: custom bullet centered in a fixed gutter. */
5681+
.boostlook.markdown-content ul > li {
56715682
position: relative;
56725683
padding-left: var(--space-xlarge);
5673-
margin-top: var(--space-medium);
56745684
}
56755685

56765686
.boostlook.markdown-content ul > li::before {
@@ -5686,16 +5696,39 @@ html.v3 .boostlook {
56865696
color: var(--color-text-primary);
56875697
}
56885698

5699+
/* Ordered lists: native decimal numbering (a custom ::before counter only
5700+
suits the single bullet char and misaligns; browsers render numbers
5701+
cleanly and follow the item's font size). */
5702+
.boostlook.markdown-content ol {
5703+
list-style: decimal;
5704+
padding-left: var(--space-xl);
5705+
}
5706+
5707+
.boostlook.markdown-content ol > li {
5708+
padding-left: var(--space-s);
5709+
}
5710+
56895711
.boostlook.markdown-content a {
56905712
color: var(--color-text-link-accent);
56915713
text-decoration: underline;
56925714
text-decoration-skip-ink: none;
56935715
text-underline-position: from-font;
56945716
}
56955717

5718+
/* Code blocks: defer to boostlook's own code styling (the boxed .boostlook pre
5719+
with its light/dark background, border and radius, and .boostlook pre code
5720+
for the monospace body). Only add horizontal-scroll safety so a wide line
5721+
scrolls inside the narrow card instead of overflowing it. */
56965722
.boostlook.markdown-content pre {
5697-
white-space: pre-wrap;
5698-
overflow-wrap: anywhere;
5723+
overflow-x: auto;
5724+
}
5725+
5726+
/* boostlook's bare-markdown layer adds a margin-top to a pre that follows a
5727+
paragraph (with !important); the card spaces blocks with the container's
5728+
flex gap, so cancel it to avoid doubled spacing above code blocks. Matches
5729+
that rule's (0,2,2) specificity and wins on source order. */
5730+
.boostlook.markdown-content p + pre {
5731+
margin-top: 0 !important;
56995732
}
57005733

57015734
.boostlook.markdown-content h1,
@@ -5734,17 +5767,9 @@ html.v3 .boostlook {
57345767
margin: 0;
57355768
}
57365769

5737-
.boostlook.markdown-content :is(code, tt, pre) {
5738-
display: inline;
5739-
font-family: var(--font-code);
5740-
font-size: 0.88em;
5741-
font-weight: var(--font-weight-medium);
5742-
color: var(--color-text-primary);
5743-
background: transparent;
5744-
padding: 0;
5745-
border: none;
5746-
border-radius: 0;
5747-
}
5770+
/* Inline code + code blocks intentionally have no card-specific override:
5771+
they inherit boostlook's code styling so the card matches the doc/site code
5772+
treatment (monospace inline code, boxed pre blocks with syntax colors). */
57485773

57495774
/* Post detail (news article body) — #2491. The container keeps its layout
57505775
(flex/gap/border) in post-detail.css; the rich-text typography lives here.

0 commit comments

Comments
 (0)