Closed Bug 1978106 Opened 29 days ago Closed 28 days ago

Intrinsic sizing of SVG breaks with `box-sizing: border-box` and `border`.

Categories

(Core :: SVG, defect)

defect

Tracking

()

VERIFIED FIXED
142 Branch
Tracking Status
firefox142 --- verified
firefox143 --- verified

People

(Reporter: dshin, Assigned: emilio)

Details

Attachments

(3 files)

(Discovered in a session of virtual escape room from)

STR: Load attached testcase
Expected: Black circle in the grey square (SVG border) should fit within black square (Containing div border)
Actual: SVG is sized bigger than the containing div

Component: Layout → SVG

For posterity / testing, here's a more complete copy of the "timer" widget that's affected by this on the original site.

The issue here is that -- in Firefox -- the outer border looks thicker on the top-left corner as compared to the bottom-right corner.

This goes back ~forever; I can reproduce in Nightly 2013-12-15 if I add a prefixed version of box-sizing (which we needed back then), i.e. -moz-box-sizing:border-box;

I think I know where this is going wrong.

Assignee: nobody → emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/53854 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 28 days ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
Upstream PR merged by moz-wptsync-bot
QA Whiteboard: [qa-triage-done-c143/b142][qa-ver-opt-c143/b142]

Issue is reproducible on a 2025-07-18 Firefox Nightly build on Windows 10, using the testcases from Comment 0 and Comment 1.
Verified as fixed on Firefox Nightly 143.0a1 and Firefox 142.0b4 on Windows 10, Ubuntu 22, macOS 15.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c143/b142][qa-ver-opt-c143/b142] → [qa-triage-done-c143/b142][qa-ver-done-c143/b142]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: