Closed Bug 2094886 Opened 12 days ago Closed 9 days ago

[wpt-sync] Sync PR 63986 - Distinguish empty custom properties from absent ones

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Domenic Denicola <d@domenic.me> wrote:

Distinguish empty custom properties from absent ones

An existing empty custom property serializes as one space so writing its serialized value back through setProperty() preserves the declaration. Correct the whitespace conversion assertion and cover getters, removal, absence, and round trips, retaining empty-string removal by setProperty().

https://drafts.csswg.org/css-variables-1/#serializing-custom-props https://github.com/w3c/csswg-drafts/issues/9847

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 2 tests and 21 subtests

Status Summary

Firefox

OK : 2
PASS: 20
FAIL: 5

Chrome

OK : 2
PASS: 20
FAIL: 5

Safari

OK : 2
PASS: 20
FAIL: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-variables/empty-custom-property-serialization.html [wpt.fyi]
    • An existing empty custom property is distinguishable from an absent property: FAIL (Chrome: FAIL, Safari: FAIL)
    • Round-tripping an empty custom property through setProperty preserves its declaration: FAIL (Chrome: FAIL, Safari: FAIL)
    • removeProperty returns the serialization of the existing empty value: FAIL (Chrome: FAIL, Safari: FAIL)
    • An empty string passed to setProperty still removes a custom property: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/cssom/style-set-property.html [wpt.fyi]
    • set toString() returning whitespace for div.style.setProperty custom property: FAIL (Chrome: FAIL, Safari: FAIL)
Status: NEW → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.