Skip to content

rustdoc UI: Warning block icon is no longer a circle (on my machine) but a squircle #144778

@fmease

Description

@fmease

Reproducer:

//! <div class="warning"></div>

Current output (FF 140.0.2, Linux, rustdoc 1.90.0 nightly 2025-07-30 3048886):

Image

Expected output (copied over from #106561, only consider the icon not the rest):

Image

I think this is a regression (on my machine) but I can't retroactively find a "good version". I've tried 1.74 (first stable version to include this feature) and 1.75 to no avail (it's not a circle). Maybe it's always been that way on my machine, I don't remember. I did remove the doc/ folder before trying a different version and I did hard-refresh.


The "i" is ⓘ, U+24D8 Circled Latin Small Letter I and I believe it's rendered with font Fire Sans, however I don't know how to confirm that using the FF dev-tools since I can't seem to inspect the computed style of pseudo elements. We do serve a local copy of Fira Sans if not available:

@font-face {
font-family: 'Fira Sans';
font-style: normal;
font-weight: 400;
src: local('Fira Sans'),
url("FiraSans-Regular-0fe48ade.woff2") format("woff2");
font-display: swap;
}

And for me it should serve that copy since I don't have Fira Sans installed (fc-list | rg Fira has empty output). Now, the font-face rule I've linked above declares the weight to be 400 which seems to check out with what I'm seeing. Then, I've checked how ⓘ (U+24D8) gets rendered per Fira Sans weight (https://fonts.google.com/specimen/Fira+Sans?preview.text=%E2%93%98) and that's what I'm seeing in my browser (image is edited to compact the data):

Image

So whether the i is circled or surrounded by a squircle seems to depend on the weight (for everyone?) and since we pick a weight of 400, it's not a circle (for me). If we picked 300 or 600, it should render as circle.

I'm wondering tho, is it only me who has this issue? Since it renders like a squircle for me even on the introductory version 1.74 I feel like my setup is busted. What?

Metadata

Metadata

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.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.regression-untriagedUntriaged performance or correctness regression.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions