v3: a journal headline stays readable when you point at it — over an image card the title rests white on the scrim and hovers in the theme's accent, which over a busy or bright thumbnail could sink into the picture, and in nyt's light scheme went black on black. A hovered title now picks up a backing plate of its own, grown around the text by padding that an equal negative margin cancels, so nothing shifts, and hugging the headline rather than spanning the card. The plate is a dark glass by default and each theme reskins it through --journal-title-hover-* properties: smooth frosts it in page colour so terracotta on cream and jasmine on Prussian Blue stay the pairs, kanagawa sets it on sumiInk with a selection edge, nyt in square flat ink, brutalist as a solid accent stamp with a hard offset shadow, geocities as a neon marquee, melange as a coffee pillow in warm shadow. nyt's unread dot, inked in the theme's black accent, goes white over a photo too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -99,3 +99,17 @@
|
||||
--btn-primary-shadow: var(--shadow-1);
|
||||
--btn-primary-shadow-hover: var(--shadow-1);
|
||||
}
|
||||
|
||||
/* A pointed-at journal headline sits on frosted page colour rather than on
|
||||
black glass: terracotta on cream and jasmine on Prussian Blue are the
|
||||
pairs this palette was picked for, where the accent on a black plate
|
||||
would lose the light scheme's terracotta. */
|
||||
:root:not([data-style]) .journal-card--image .journal-card-title,
|
||||
[data-style="smooth"] .journal-card--image .journal-card-title {
|
||||
--journal-title-hover-bg: light-dark(
|
||||
rgb(255 253 248 / 0.9),
|
||||
rgb(1 21 42 / 0.78)
|
||||
);
|
||||
--journal-title-hover-radius: var(--radius-md);
|
||||
--journal-title-hover-filter: blur(6px);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user