Closed Bug 1630488 Opened 5 years ago Closed 4 days ago

Incorrect "Invalid Property Value" for custom property with a single whitespace token

Categories

(DevTools :: Inspector: Rules, defect, P3)

75 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1713787

People

(Reporter: James0x57, Unassigned)

References

Details

Attachments

(3 files)

Attached image 9JcHwni[1].png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Any custom CSS property who's value is a single whitespace token is incorrectly flagged as "Invalid Property Value"

--foo: ;

Actual results:

dev tools shows the property as invalid

Expected results:

a single whitespace token is a valid value so it should not be flagged as invalid:
https://www.w3.org/TR/css-variables-1/#syntax
see the 3rd note there ^, quoted here:

Note: While <declaration-value> must represent at least one token, that one token may be whitespace. This implies that --foo: ; is valid, and the corresponding var(--foo) call would have a single space as its substitution value, but --foo:; is invalid.

If it helps, here is markup you can use to verify:
<html>
<head></head>
<body style="--foo: ; --bar: ;"></body>
</html>

inspect the body tag to see the bug

Assignee: nobody → rcaliman
Priority: -- → P2

Resetting severity to default of --.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: P2 → P3
Assignee: rcaliman → nobody
Severity: normal → S3

This appears to be fixed?

I've just stumbled upon the test case I made for this 5 years ago and there doesn't seem to be any issue in DevTools anymore (what it looked like in 2020).

(In reply to Ana Tudor from comment #5)

Created attachment 9463448 [details]
February 2025 screenshot

This appears to be fixed?

I've just stumbled upon the test case I made for this 5 years ago and there doesn't seem to be any issue in DevTools anymore (what it looked like in 2020).

Hello Ana 👋
yes, it looks like this was fixed, probably by Bug 1713787, I'm going to close this bug
We also fixed a few other things around empty custom properties in the inspector (e.g. Bug 1912263)

Status: NEW → RESOLVED
Closed: 4 days ago
Duplicate of bug: 1713787
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: