Sign minus alone is not interpreted in CSS function calc()
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: florimond.alemps, Unassigned)
Details
Attachments
(1 file)
|
681 bytes,
image/svg+xml
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0
Steps to reproduce:
Written like that "-" is not interpreted in :
transform : translateX(calc(- var(--offset)));
This is the work around:
transform : translateX(calc(-1 * var(--offset)));
Actual results:
transform is not applied
Expected results:
Both statements should produce the same result
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Web Painting' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
The severity field is not set for this bug.
:TYLin, could you have a look please?
For more information, please visit BugBot documentation.
Comment 3•2 years ago
|
||
transform : translateX(calc(- var(--offset)));
It looks like the calc() grammar only allows binary operators such as +, -, *, and /, and does not allow unary minus operator https://drafts.csswg.org/css-values/#calc-syntax
The testcase look the same in Firefox, Google Chrome, and Safari, so this bug is likely invalid.
Description
•