Open Bug 1630488 Opened 4 years ago Updated 2 years 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)

People

(Reporter: James0x57, Unassigned)

References

Details

Attachments

(2 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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: