Skip to content

Rustdoc: table stripes hide inline code span background color #159234

Description

@laundmo

Code

I ran into this in Bevy, tho the effect is noticeable in any rustdoc docs which uses a table containing inline code spans.

/// | Examples                          | Explanation                    |
/// | --------------------------------- | ------------------------------ |
/// | `CompA`                           | A unit or default component... |
/// | `CompA(val)`<br>`CompA(val, val)` | Tuple Component with some...   |

Reproduction Steps

  1. Write a doc comment with a table which has an inline code span like this i the second row
  2. generate rustdoc
  3. view with dark or ayu themes
  4. notice how inline code span background disappears into alternating table color

Expected Outcome

Inline code spans background to stand out inside tables, making it easy to understand whats supposed to be code and what text.

Actual Output

Example here: https://docs.rs/bevy_scene/latest/bevy_scene/macro.bsn.html

Screencast_20260713_173318.webm

Its especially bad on the non-ayu dark theme, where the text color for inline spans is white as well, which means the only factor to distinguish inline code from text is the monospace font.

Version

rustdoc 1.98.0-nightly (57d0690 2026-05-27)

But the css still exists on main as of posting this.

Additional Details

Introduced by #105486 best i can tell

Metadata

Metadata

Assignees

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions