Skip to content

Commit 572afe0

Browse files
committed
Move markdown card styling to boostlook
Markdown card and user-profile bio now carry the boostlook class and pull styling from the vendored boostlook-v3.css. Overrides in markdown-card.css removed, left as a pointer. Depends on the matching boostlook commit landing first.
1 parent 8e48abe commit 572afe0

4 files changed

Lines changed: 150 additions & 115 deletions

File tree

static/css/v3/boostlook-v3.css

Lines changed: 144 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,30 +1352,33 @@ html:not(.v3):has(.boostlook) {
13521352
components, READMEs) that lack Antora's .paragraph wrapper, so the rule
13531353
above never matches them. Scoped :not(:has(.doc)) so Antora doc content
13541354
keeps its own structure-based spacing below. */
1355-
.boostlook:not(:has(.doc)) p + p {
1355+
/* The :not(...) guards are wrapped in :where() so they add no specificity:
1356+
this bare-markdown layer is a low baseline (.boostlook + element level) that
1357+
component rules (e.g. .boostlook.markdown-content ul) can override cleanly. */
1358+
.boostlook:where(:not(:has(.doc))) p + p {
13561359
margin-top: var(--padding-padding-md, 1rem);
13571360
}
13581361

13591362
/* Markdown lists — bare <ul>/<ol> from markdown (site components, READMEs)
13601363
that lack Antora's .ulist/.olist wrappers. Tailwind's preflight strips the
13611364
markers, indent and margins on the site, and boostlook's Antora list rules
1362-
never match these, so restore them here. Scoped :not(:has(.doc)) and
1363-
:not([class]) so only bare markdown lists are touched, never Antora or
1364-
classed nav/tab lists. */
1365-
.boostlook:not(:has(.doc)) :is(ul, ol):not([class]) {
1365+
never match these, so restore them here. Scoped :where(:not(:has(.doc))) and
1366+
:where(:not([class])) so only bare markdown lists are touched, never Antora
1367+
or classed nav/tab lists, and with no added specificity. */
1368+
.boostlook:where(:not(:has(.doc))) :is(ul, ol):where(:not([class])) {
13661369
margin: var(--padding-padding-md, 1rem) 0;
13671370
padding-left: var(--spacing-size-lg, 1.5rem);
13681371
}
1369-
.boostlook:not(:has(.doc)) ul:not([class]) {
1372+
.boostlook:where(:not(:has(.doc))) ul:where(:not([class])) {
13701373
list-style: disc;
13711374
}
1372-
.boostlook:not(:has(.doc)) ol:not([class]) {
1375+
.boostlook:where(:not(:has(.doc))) ol:where(:not([class])) {
13731376
list-style: decimal;
13741377
}
1375-
.boostlook:not(:has(.doc)) :is(ul, ol):not([class]) li + li {
1378+
.boostlook:where(:not(:has(.doc))) :is(ul, ol):where(:not([class])) li + li {
13761379
margin-top: var(--padding-padding-3xs, 0.25rem);
13771380
}
1378-
.boostlook:not(:has(.doc)) li > :is(ul, ol):not([class]) {
1381+
.boostlook:where(:not(:has(.doc))) li > :is(ul, ol):where(:not([class])) {
13791382
margin: var(--padding-padding-3xs, 0.25rem) 0 0;
13801383
}
13811384

@@ -5569,11 +5572,41 @@ html.dark .boostlook#libraryReadMe {
55695572
Note: these reference website-v2 design tokens by design.
55705573
============================================================ */
55715574

5575+
/* v3 site: a .boostlook island sits on the host page's own surface, not
5576+
boostlook's doc surface, so clear the background boostlook sets on every
5577+
.boostlook element. Docs (iframe html has no .v3) keep their surface. */
5578+
html.v3 .boostlook {
5579+
background: transparent;
5580+
}
5581+
5582+
/* Non-doc site components use v2's primary text color (near-black in light,
5583+
white in dark) rather than boostlook's lighter doc body grey. Paragraphs
5584+
inherit their container instead of boostlook's hardcoded `.boostlook p`
5585+
grey, so each component's own color flows through.
5586+
Font: boostlook's base container forces "Mona Sans" (!important) plus a
5587+
condensed font-variation-settings ("wght" 400, "wdth" 95). Non-doc site
5588+
components should render the site's own type instead, so inherit both the
5589+
family (!important to beat boostlook's base rule) and the variation settings
5590+
from the host page. Headings that set their own font-family (e.g.
5591+
--font-display) still win. */
5592+
.boostlook:where(:not(:has(.doc))) {
5593+
color: var(--color-text-primary);
5594+
font-family: inherit !important;
5595+
font-variation-settings: inherit;
5596+
}
5597+
5598+
/* boostlook renders bold as a condensed variable-font axis
5599+
("wght" 600, "wdth" 87.5); non-doc components should use the site's normal
5600+
bold weight, so drop the axis override and let font-weight take effect. */
5601+
.boostlook:where(:not(:has(.doc))) :is(b, strong) {
5602+
font-variation-settings: inherit;
5603+
}
5604+
.boostlook:where(:not(:has(.doc))) p {
5605+
color: inherit;
5606+
}
5607+
55725608
/* Content modal (testimonials) — #2491 */
55735609
.boostlook.content-modal__prose {
5574-
/* Sit on the modal surface; clear the white background the global
5575-
`.boostlook` rule applies. */
5576-
background: transparent;
55775610
color: var(--color-text-secondary);
55785611
font-family: var(--font-sans);
55795612
font-size: var(--font-size-base);
@@ -5613,3 +5646,102 @@ html.dark .boostlook#libraryReadMe {
56135646
padding: 0;
56145647
line-height: var(--line-height-loose);
56155648
}
5649+
5650+
/* Markdown card + user-profile bio (shared .markdown-content) — #2491 */
5651+
.boostlook.markdown-content {
5652+
gap: var(--space-medium);
5653+
padding: 0 var(--space-large);
5654+
font-size: var(--font-size-small);
5655+
font-weight: var(--font-weight-regular);
5656+
line-height: var(--line-height-code);
5657+
letter-spacing: var(--letter-spacing-tight);
5658+
overflow-y: auto;
5659+
overflow-wrap: anywhere;
5660+
min-width: 0;
5661+
}
5662+
5663+
.boostlook.markdown-content ul,
5664+
.boostlook.markdown-content ol {
5665+
list-style: none;
5666+
padding: 0;
5667+
margin: 0;
5668+
}
5669+
5670+
.boostlook.markdown-content li {
5671+
position: relative;
5672+
padding-left: var(--space-xlarge);
5673+
margin-top: var(--space-medium);
5674+
}
5675+
5676+
.boostlook.markdown-content ul > li::before {
5677+
content: "\2022";
5678+
position: absolute;
5679+
left: 0;
5680+
top: 0;
5681+
width: var(--space-xlarge);
5682+
height: calc(var(--font-size-small) * 1.2);
5683+
display: flex;
5684+
align-items: center;
5685+
justify-content: center;
5686+
color: var(--color-text-primary);
5687+
}
5688+
5689+
.boostlook.markdown-content a {
5690+
color: var(--color-text-link-accent);
5691+
text-decoration: underline;
5692+
text-decoration-skip-ink: none;
5693+
text-underline-position: from-font;
5694+
}
5695+
5696+
.boostlook.markdown-content pre {
5697+
white-space: pre-wrap;
5698+
overflow-wrap: anywhere;
5699+
}
5700+
5701+
.boostlook.markdown-content h1,
5702+
.boostlook.markdown-content h2,
5703+
.boostlook.markdown-content h3,
5704+
.boostlook.markdown-content h4,
5705+
.boostlook.markdown-content h5,
5706+
.boostlook.markdown-content h6 {
5707+
color: var(--color-text-primary);
5708+
font-family: var(--font-display);
5709+
font-weight: var(--font-weight-medium);
5710+
margin: 0;
5711+
}
5712+
5713+
.boostlook.markdown-content h1 { font-size: var(--font-size-large); }
5714+
.boostlook.markdown-content h2 { font-size: var(--font-size-medium); }
5715+
.boostlook.markdown-content h3 { font-size: var(--font-size-base); }
5716+
.boostlook.markdown-content h4,
5717+
.boostlook.markdown-content h5,
5718+
.boostlook.markdown-content h6 { font-size: var(--font-size-small); }
5719+
5720+
.boostlook.markdown-content b,
5721+
.boostlook.markdown-content strong {
5722+
color: var(--color-text-primary);
5723+
font-weight: var(--font-weight-medium);
5724+
}
5725+
5726+
.boostlook.markdown-content p {
5727+
/* Keep the card's paragraph size/spacing faithful to v2. Color comes from
5728+
the non-doc `color: inherit` rule above, so it follows the container
5729+
(v2's primary near-black) instead of boostlook's grey. */
5730+
font-size: var(--font-size-small);
5731+
line-height: var(--line-height-code);
5732+
letter-spacing: var(--letter-spacing-tight);
5733+
padding: 0;
5734+
margin: 0;
5735+
}
5736+
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+
}

static/css/v3/markdown-card.css

Lines changed: 4 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,4 @@
1-
.card__column.markdown-content {
2-
gap: var(--space-medium);
3-
line-height: var(--line-height-code);
4-
}
5-
6-
.markdown-content ul,
7-
.markdown-content ol {
8-
list-style: none;
9-
padding: 0;
10-
}
11-
12-
.markdown-content li {
13-
position: relative;
14-
padding-left: var(--space-xlarge);
15-
margin-top: var(--space-medium);
16-
17-
}
18-
19-
.markdown-content ul > li::before {
20-
content: "\2022";
21-
position: absolute;
22-
left: 0;
23-
top: 0;
24-
width: var(--space-xlarge);
25-
height: calc(var(--font-size-small) * 1.2);
26-
display: flex;
27-
align-items: center;
28-
justify-content: center;
29-
color: var(--color-text-primary);
30-
}
31-
32-
.markdown-content a {
33-
color: var(--color-text-link-accent);
34-
text-decoration: underline;
35-
text-decoration-skip-ink: none;
36-
text-underline-position: from-font;
37-
}
38-
39-
.markdown-content {
40-
color: var(--color-text-secondary);
41-
padding: 0 var(--space-large);
42-
font-size: var(--font-size-small);
43-
font-weight: var(--font-weight-regular);
44-
letter-spacing: var(--letter-spacing-tight);
45-
overflow-y: auto;
46-
overflow-wrap: anywhere;
47-
min-width: 0;
48-
}
49-
50-
.markdown-content pre {
51-
white-space: pre-wrap;
52-
overflow-wrap: anywhere;
53-
}
54-
55-
.markdown-content h1,
56-
.markdown-content h2,
57-
.markdown-content h3,
58-
.markdown-content h4,
59-
.markdown-content h5,
60-
.markdown-content h6 {
61-
color: var(--color-text-primary);
62-
font-family: var(--font-display);
63-
font-weight: var(--font-weight-medium);
64-
margin: 0;
65-
}
66-
67-
.markdown-content h1 { font-size: var(--font-size-large); }
68-
.markdown-content h2 { font-size: var(--font-size-medium); }
69-
.markdown-content h3 { font-size: var(--font-size-base); }
70-
.markdown-content h4,
71-
.markdown-content h5,
72-
.markdown-content h6 { font-size: var(--font-size-small); }
73-
74-
.markdown-content b,
75-
.markdown-content strong {
76-
color: var(--color-text-primary);
77-
font-weight: var(--font-weight-medium);
78-
}
79-
80-
.markdown-card p {
81-
padding: 0;
82-
margin: 0;
83-
}
84-
85-
.markdown-card ul,
86-
.markdown-card ol {
87-
list-style-position: outside;
88-
padding-left: 14px;
89-
}
90-
91-
.markdown-content :is(code, tt, pre) {
92-
display: inline;
93-
font-family: var(--font-code);
94-
font-size: 0.88em;
95-
font-weight: var(--font-weight-medium);
96-
color: var(--color-text-primary);
97-
background: transparent;
98-
padding: 0;
99-
border: none;
100-
border-radius: 0;
101-
}
1+
/* The .markdown-content styling (markdown card + user-profile bio) now lives in
2+
Boostlook (boostlook repo: src/css/17-site-components.css), scoped
3+
.boostlook.markdown-content, and ships with boostlook-v3.css. The containers
4+
carry the `boostlook` class. Nothing to override here. #2491 */

templates/v3/includes/_markdown_card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<span class="card__title">{{ title }}</span>
1414
</div>
1515
<hr class="card__hr" aria-hidden="true" />
16-
<div class="card__column markdown-content">
16+
<div class="card__column markdown-content boostlook">
1717
{% if html %}{{ html|safe }}{% else %}{{ markdown|markdown }}{% endif %}
1818
</div>
1919
{% if button_url and button_label %}

templates/v3/includes/_user_profile_bio_card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</div>
2525
<hr class="card__hr" />
2626
{% endif %}
27-
<div class="card__column markdown-content">{{ markdown|markdown }}</div>
27+
<div class="card__column markdown-content boostlook">{{ markdown|markdown }}</div>
2828
{% if button_url and button_label %}
2929
<hr class="card__hr" />
3030
<div class="card__cta_section">

0 commit comments

Comments
 (0)