Repository navigation
Give every citation the prose-link treatment - #18
Merged
Merged
Conversation
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
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 asMalhan et al. 2018— rendered ascite > 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 setstext-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 ahadcolor rgb(166,124,60)withtext-decoration-color rgb(96,165,250)and the DOI-lesscite spanhad Tailwind blue text; after, all citations (anchor and span, bibliography and insight-attached) reportcolor rgb(166,124,60)and an accent underline.packages/astra/tests/styles-contract.test.tspasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01QNQBG6z1s7ptmxvAyE9d99