Skip to content

calc() with comment brings unexpected result #430

Open
@mhampl

Description

@mhampl

The CSS snippet
mypar { width:calc(10em /*comment*/ + 10px) }
gives the error
Value Error : width /*comment*/ + is an incorrect operator 10px)

When replacing the plus operator by a minus, giving the very similar code
mypar { width:calc(10em /*comment*/ - 10px) }
this is evaluated as valid.

A "valid" result is also given, when I remove the space character between percent sign and start of the comment indicator
mypar { width:calc(10em/*comment*/ + 10px) }
or when totally removing the comment.

I do not see any reason why the first example should be not valid, if all other ones are. (Check was done for CSS level 3 + SVG.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions