Sorry folks for the slow process with this. But my time is really limited. I have a real job >40h and a real family and too many projects i'm working on (https://www.openhub.net/accounts/RBRi/positions) in my spare time.
Every patch is very welcome.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From what I'm seeing in my tests, when a calc() with a sub-expression is processed, like:
calc((-3em)*2)
the (-3em) part is classified as a function (SAC_FUNCTION) instead of SAC_SUB_EXPRESSION. The problem is that the first operand (the -3em in that example) returns a null identifier (SAC_IDENT with value null) when getPreviousLexicalUnit() is called on it, and my Object Model breaks there during a verification process. I have a similar issue when a var() function is found inside a calc().
Moreover, my custom-calc tests also break, and it would be handy if the calc() processing also applied to things ending with "-calc", like -webkit-calc() which sometimes still shows up out there.
Neither of those issues are really important to me, and I'm not asking you to spend a significant amount of time on them, but I'm reporting just in case they are low-hanging fruit, easy to fix... 🙂
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I support this request given that it seems quite common to have spaces in calc expressions.
Thanks!
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Me too, We have some calc expression which cause problems when we use your lib..
Thanks !
Last edit: Anonymous 2016-08-25
Sorry folks for the slow process with this. But my time is really limited. I have a real job >40h and a real family and too many projects i'm working on (https://www.openhub.net/accounts/RBRi/positions) in my spare time.
Every patch is very welcome.
sorry had to postpone this again but work has already started
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Any progress on this issue? :)
Would really appreciate on any update on this issue.
Waiting forward for the fix.
New year, new hopes :)
+1 for this bug, really important for us.
Also, when printing the CSS after parsing the aritmetic char is gone :
prints :
Hi,
I just submitted a patch that adds experimental support for calc(): https://sourceforge.net/p/cssparser/patches/11/
Best,
Christian
done with 0.9.28
Hi,
From what I'm seeing in my tests, when a
calc()
with a sub-expression is processed, like:calc((-3em)*2)
the
(-3em)
part is classified as a function (SAC_FUNCTION
) instead ofSAC_SUB_EXPRESSION
. The problem is that the first operand (the-3em
in that example) returns a null identifier (SAC_IDENT
with valuenull
) whengetPreviousLexicalUnit()
is called on it, and my Object Model breaks there during a verification process. I have a similar issue when avar()
function is found inside acalc()
.Moreover, my custom-calc tests also break, and it would be handy if the
calc()
processing also applied to things ending with "-calc", like-webkit-calc()
which sometimes still shows up out there.Neither of those issues are really important to me, and I'm not asking you to spend a significant amount of time on them, but I'm reporting just in case they are low-hanging fruit, easy to fix... 🙂