Repository navigation
fix(web): keep styled spans inside exported inline links inline - #2663
Merged
Merged
Conversation
Hona
force-pushed
the
fix/web-export-inline-links
branch
from
November 27, 2026 22:21
7b4bf57 to
a7489d8
Compare
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.
Fixes #2655.
Cause
BASE_CSSincrates/rune/src/runtime/web/export/page.rssetsdisplay: flex; position: relativeon[data-rune-static] *and previously reset only direct children of a text element ([data-rune-static] .t>*{display:inline;position:static}).When a paragraph or heading contains a styled inline link,
css::text_htmlemits<a href="..."><span style="...">...</span></a>. Because the<span>is a grandchild of.t, it missed.t>*, inheriteddisplay: flex, and caused CSS block-in-inline splitting that put the linked text on its own line.Change
BASE_CSSfrom[data-rune-static] .t>*to[data-rune-static] .t *so<a>elements and any styled<span>runs nested inside them staydisplay: inline; position: static.El::hrefon a container) do not carry or sit inside.t, so they keep their flex layout while any nested rich-text children keep their own.tscope.changelog/unreleased/2026-11-28-web-export-inline-links.md.Verification
cargo test -p rune --lib runtime::web::export(14 passed)cargo test -p rune --lib tooling::html(3 passed)cargo check -p rune --target wasm32-unknown-unknown(passed)