Trim trailing whitespaces in CSS value containing var()
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
People
(Reporter: gui.lebas, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Steps to reproduce:
Set the color
CSS property value to var( --blue )
via element.style
or in a stylesheet.
Actual results:
The serialized value output from element.getPropertyValue('color')
is var( --blue )
.
Expected results:
The output should be var( --blue )
, ie. the trailing whitespaces should be trimmed in the original string, according to the intent of W3C spec authors declared in this issue of the w3c/csswg-drafts Github repository for serializing a var()-containg value the same way as a custom property value, and following Emilio's request to fill this bug: https://github.com/w3c/csswg-drafts/issues/6484
Whitespaces have been trimmed by the Markdown parser in my above comment. I was meaning (whitespace is replaced by _
):
Steps to reproduce:
Set the color
CSS property value to __var( --blue )__
via element.style
or in a stylesheet.
Actual results:
The serialized value output from element.getPropertyValue('color')
is var(__--blue__)__
.
Expected results:
The output should be var(__--blue__)
.
Comment 2•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: CSS Object Model' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•4 years ago
|
Description
•