NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
False error reported in CSS files when calc() uses more ()


Joined: 27 Mar 2023
Posts: 48
Reply with quote
Hello!

I've already reported the bug via the contact form on the web site, but I've got no response, apart from the automated one...

What is happening is that PHPEd reports an error on a perfectly valid CSS line like this:

font-size: calc((190 / 1920) * 100vw);

the error reported is "unexpected (", which is totally wrong: one of the best features of calc() in CSS is justa that yoy can use whichever formula you want, including using multiple levels of parentheses to prioritize operations in the formula with an order whic may be different from the pure algebraic order of execution.

Also, another little bug is present in this situation:

z-index:calc( var(--base-z-index) + 1);

reports a "unexpected space" error on the space between + sign and 1; again this is INCORRECT, since the css spec for calc() explicitly states that operators such as +-*/ should always be space delimited, as to make them completely different from other meanings (for example, to keep a difference between - 20px (meaning subtract 20 pixels) and -20px (a negative distance of 20px)...

Could you please resolve these? I think I'm not the only one who extensively uses calc formulas with parentheses and operators in css...
View user's profileFind all posts by ShoresOfNowhereSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
it will be addressed in a next build after forthcoming 20030

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


Joined: 27 Mar 2023
Posts: 48
Reply with quote
Thanks, I'm looking forward to that update!
View user's profileFind all posts by ShoresOfNowhereSend private message


Joined: 27 Mar 2023
Posts: 48
Reply with quote
Hi!

Does the 20032 update address this problem?

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

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Hey ShoresOfNowhere,
I'm sorry, no, it's not been addressed yet. We've got a series of higher priority issues to be fixed,
In 20031 in the beginning, not so successful, in 20032 acceptable but not finished, now in 20033 almost there, and we will post 20034 to finish the work related to running the test suites.
Then we'll resume what we started on this issue with calc and var:

https://www.w3.org/TR/css-values-3/#calc-syntax
Quote:
In addition, white space is required on both sides of the + and - operators. (The * and / operators can be used without white space around them.)

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

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
20034 comes with certain updates to support calc() and the other math functions in CSS. Let me know if it works fine for you

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


Joined: 27 Mar 2023
Posts: 48
Reply with quote
Both bugs are resolved for me in 20034!

Thanks!
View user's profileFind all posts by ShoresOfNowhereSend private message
False error reported in CSS files when calc() uses more ()
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