Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calc() with comment brings unexpected result #430

Open
mhampl opened this issue Oct 12, 2024 · 0 comments
Open

calc() with comment brings unexpected result #430

mhampl opened this issue Oct 12, 2024 · 0 comments

Comments

@mhampl
Copy link

mhampl commented Oct 12, 2024

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant