Closed Bug 1979845 Opened 11 months ago Closed 11 months ago

[wpt-sync] Sync PR 53186 - WPTs for different CSS values of `width` and `height` for SVG elements

Categories

(Core :: SVG, task, P4)

task

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 53186 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/53186
Details from upstream follow.

Divyansh Mangal <dmangal@microsoft.com> wrote:

WPTs for different CSS values of width and height for SVG elements

This PR adds Web Platform Tests (WPTs) to verify the behavior of various CSS width and height values—such as auto, calc-size(), calc(), Ems, fit-content, inherit, initial, max-content, min-content, percent, Rems, stretch and viewport units like vw/vh—when applied to SVG elements.
These tests aim to ensure consistent rendering across browsers and clarify expected layout behavior for SVGs styled with modern CSS sizing keywords.

Defined Behavior

  1. Absolute units:
    These include units like px, pt, pc, cm, mm, in. Absolute values are defined in the specification

  2. Relative units
    These include units like em, rem, %, ex, ch, lh, rlh. Relative values are defined in the specification (though only % in mentioned in the specification)

  3. Special keyword:
    These include keywords like auto, initial, inherit, unset, revert, revert-layer. Their behavior is also defined in the SVG specification (though only auto and inherit is mentioned in the specification). Other values like initial, revert, unset etc. are not mentioned but their behavior seems to be consistent.

Undefined Behavior

  1. Viewport relative units:
    These include units like vw, vh, vmin, vmax, svw, svh, lvw, lvh, dvw, dvh. These units/values depend on the viewport on where the element is defined. The specification does not explicitly mention what viewport which respect to which their values should be resolved.

  2. Intrinsic sizing keywords:
    These include keywords like min-content, max-content, fit-content, stretch. These units depend on CSS box model for their computation and hence their behavior is ambiguous for elements like rect, circle, nested svg elements etc.

  3. Calculated values:
    These include functions like calc(), min(), max(), clamp(), calc-size().

An issue for this is raised for the new expectations to be discussed.
https://github.com/w3c/csswg-drafts/issues/12376

Component: web-platform-tests → SVG
Product: Testing → Core

CI Results

Ran 7 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 15 tests

Status Summary

Firefox

PASS: 1
FAIL: 14

Chrome

PASS: 7
FAIL: 8

Safari

FAIL: 15

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
You need to log in before you can comment on or make changes to this bug.