NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
False error in css when calc uses negative number


Joined: 27 Mar 2023
Posts: 26
Reply with quote
When a calc expression uses a negative number the false parsing erro "unexpected "-"" is produced on the - symbol:

Code:
bottom:calc(var(--raggio) * -1);


This is present in the latest 20034 build
View user's profileFind all posts by ShoresOfNowhereSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
Thanks. Will check this.
Looks like -1 case is not defined in calc() syntax in css-values-3 https://www.w3.org/TR/css-values-3/#calc-syntax

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Mar 2023
Posts: 26
Reply with quote
I think it is defined, in product it uses a calc-number-value

https://www.w3.org/TR/css-values-3/#typedef-calc-number-value

Which in turn could be a number-value

https://www.w3.org/TR/css-values-3/#number-value

Which clearly can have a sign.
View user's profileFind all posts by ShoresOfNowhereSend private message


Joined: 27 Mar 2023
Posts: 26
Reply with quote
Still present in 20035.

Any news on that bug?

Thanks!
View user's profileFind all posts by ShoresOfNowhereSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
first of all, it's not a bug. Different version of standard define it differently, original css3 didn't define it at all.
2nd -- my understanding is that the issue was resolved in ~ July, at least I don't see any syntax errors for bottom:calc(var(--raggio) * -1);



If I insert a space between - and 1, syntax error will be properly reported

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Mar 2023
Posts: 26
Reply with quote
My PHPEd tells me I'm on the latest version and I still see the bug:

margin-right:calc((var(--coldxwid) + 10px) * -1 );

Still produces an error on the minus that starts -1...

View user's profileFind all posts by ShoresOfNowhereSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
20035 is not the latest. Can you re-check with the latest?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Mar 2023
Posts: 26
Reply with quote
Tested with 20036 and the bug is gone!

Thank you very much!
View user's profileFind all posts by ShoresOfNowhereSend private message
False error in css when calc uses negative number
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic