Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/* accent: --color-accent for fills only, --color-accent-text for colored text */
--color-accent: #bafc3c;
--color-accent-text: #3f7a00;
--color-accent-text: #3a7000;
--color-accent-contrast: #141414;
--color-link: var(--color-accent-text);

Expand Down
14 changes: 14 additions & 0 deletions app/ui/site/page-header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@
overflow-wrap: anywhere;
}

/* The tight h1 line height lets the highlight reach the line above. Painting it
behind the title's other text keeps those descenders on top. */
.header h1 {
isolation: isolate;
}

.header h1 mark {
position: relative;
z-index: -1;
background: var(--color-accent);
border-radius: var(--radius);
box-decoration-break: clone;
Expand All @@ -32,6 +40,12 @@
padding-inline: 0.16em;
}

/* A highlight that is or holds a link paints normally, so the link stays clickable. */
.header h1 a mark,
.header h1 mark:has(a) {
z-index: auto;
}

.header > p {
color: var(--color-text);
font-size: var(--text-body);
Expand Down
9 changes: 9 additions & 0 deletions app/ui/site/prose.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@

.prose h1 {
font-size: var(--text-h1);
isolation: isolate;
line-height: var(--line-h1);
}

.prose h1 mark {
position: relative;
z-index: -1;
background: var(--color-accent);
border-radius: var(--radius);
box-decoration-break: clone;
Expand All @@ -26,6 +29,12 @@
padding: 0 0.18em;
}

/* A highlight that is or holds a link paints normally, so the link stays clickable. */
.prose h1 a mark,
.prose h1 mark:has(a) {
z-index: auto;
}

.prose h2 {
font-size: var(--text-h2);
}
Expand Down
Loading