Skip to content

Bump railroad-dependency; themed syntax diagrams - #2328

Open
lukaslueg wants to merge 1 commit into
rust-lang:masterfrom
lukaslueg:railroad39
Open

Bump railroad-dependency; themed syntax diagrams#2328
lukaslueg wants to merge 1 commit into
rust-lang:masterfrom
lukaslueg:railroad39

Conversation

@lukaslueg

Copy link
Copy Markdown
Contributor

This bumps the railroad-dependency from 0.3.7 to 0.3.9, which fixes some minor layout issues. It also introduces support for the themes used by mdBook, instead of relying on just two global light / dark themes.

Some global CSS rules were (re-) moved to support multiple themes. The railroad-specific stylesheets are no longer put into the page's content if that page doesn't include a diagram, shaving some bytes off. The test was added to ensure that the stylesheets' selectors (which are defined upstream) don't ever leak outside the svg.railroad-namespace; this wasn't a problem before, just for future-compatibility.

I built and visually inspected the reference locally, and it seems fine to me.

Please notice that I couldn't exactly figure out the licensing status of the Rust, Coal, Navy and Ayu themes; out of an abundance of caution, the stylesheets include a reference to the original definitions from which these themes were derived, which is included in the final CSS. De facto the palettes seem to be ubiquitous around the web.

Please notice that an LLM was used to assist in these changes.

Light

light

Rust

rust

Coal

coal

Navy

navy

Ayu

ayu

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: The marked PR is awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants