Skip to content

Give every citation the prose-link treatment - #18

Merged
EiffL merged 1 commit into
mainfrom
fix/citation-link-styling
Sep 10, 2026
Merged

EiffL merged 1 commit into
mainfrom
fix/citation-link-styling

Conversation

@EiffL

@EiffL EiffL commented Sep 10, 2026

Copy link
Copy Markdown
Member

What

In the article theme, bibliography citations rendered two ways: entries with a DOI (cite > a.hover-link) got Antique Gold text but kept Tailwind's blue underline, and entries without a DOI or URL — arXiv-only bibliography entries such as Malhan et al. 2018 — rendered as cite > span.hover-link, which the existing override (... a { color: var(--astra-accent) }) does not match, so they stayed Tailwind blue.

This widens the prose-link rule to :is(a, .hover-link) and sets text-decoration-color (45% accent at rest, full accent on hover, the same convention as .astra-evidence__name), so every citation reads the same as the theme's own insight citations.

Verified

Measured with headless Chromium on a built article (GD-1 executable edition): before, cite a had color rgb(166,124,60) with text-decoration-color rgb(96,165,250) and the DOI-less cite span had Tailwind blue text; after, all citations (anchor and span, bibliography and insight-attached) report color rgb(166,124,60) and an accent underline. packages/astra/tests/styles-contract.test.ts passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QNQBG6z1s7ptmxvAyE9d99

MyST renders a citation as cite > a.hover-link when its entry resolves to
a DOI or URL and as cite > span.hover-link when it does not (an arXiv-only
bibliography entry). The article override only matched anchors and only
set color, so DOI-less citations stayed Tailwind blue and every citation
kept Tailwind's blue underline under Antique Gold text. Match the
.hover-link token as well as anchors and colour the underline too, using
the same 45% accent underline as the evidence names.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QNQBG6z1s7ptmxvAyE9d99

@EiffL EiffL left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@EiffL
EiffL merged commit e940f7e into main Sep 10, 2026
1 check passed
@github-actions

Copy link
Copy Markdown
Contributor

Lightcone previews: Paper · Playground — inventory, viewers, dialogs and glyphs

7393954 · @astra-spec/ui 0.0.5 from 9c940eb · Lightcone brand 0.0.3 · astra-theme 7393954 · content 3735fcc · MySTRA https://github.com/LightconeResearch/MySTRA/releases/download/v0.0.8/mystra.mjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant