There are 4 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-9ed7593a-5039-46ac-a509-68c9bac384f3 XWIKI-21246 Open

CSS minification removes spaces around operator in calc expressions

 
View issue   ยท   Add comment
 

4 comments

 
cid:jira-generated-image-avatar-050a9be2-0f35-482a-8b06-76aaca1fe0ca JP Kleijn on 01/Jun/24 09:54
 

After searching the web a bit (a few years ago) I found an article stating that this could be caused by LESS trying to compile calc() properties. I do not know if LESS was the issue but the solution stated in this article worked.

The solution for this was to use the tilde (~) before stating the calc property, like so:

{{.class

{ padding-left: calc(~"100% + 20px"); }

}}

{{}}

 
cid:jira-generated-image-avatar-050a9be2-0f35-482a-8b06-76aaca1fe0ca JP Kleijn on 01/Jun/24 09:56
 
After searching the web a bit (a few years ago) I found an article stating that this could be caused by LESS trying to compile calc() properties. I do not know if LESS was the issue but the solution stated in this article worked.

The solution for this was to use the tilde (~) before stating the calc property, like so:

{ { code:java}
.class {
 
    padding-left: calc(~"100% + 20px");
}
}}

{ { code } }
 
cid:jira-generated-image-avatar-050a9be2-0f35-482a-8b06-76aaca1fe0ca JP Kleijn on 01/Jun/24 09:58
 
After searching the web a bit (a few years ago) I found an article stating that this could be caused by LESS trying to compile calc() properties. I do not know if LESS was the issue but the solution stated in this article worked. The link to the article:

[https://stackoverflow.com/questions/25353427/using-less-css3-calc-doesnt-work-correctly|Using Less, CSS3 calc() doesn't work correctly [duplicate]]

The solution for this was to use the tilde (~) before stating the calc property, like so:
{code:java}
.class {
  padding-left: calc(~"100% + 20px");
}{code}
 
cid:jira-generated-image-avatar-050a9be2-0f35-482a-8b06-76aaca1fe0ca JP Kleijn on 01/Jun/24 09:59
 
After searching the web a bit (a few years ago) I found an article stating that this could be caused by LESS trying to compile calc() properties. I do not know if LESS was the issue but the solution stated in this article worked. The link to the article:

[
How to prevent Less from trying to compile CSS calc() properties?| https://stackoverflow.com/questions/ 25353427 11972084 / using how - to-prevent- less- css3 from - calc trying - doesnt to - work compile - correctly|Using Less, CSS3 css- calc () doesn't work correctly [duplicate -properties ] ]

The solution for this was to use the tilde (~) before stating the calc property, like so:
{code:java}
.class {
  padding-left: calc(~"100% + 20px");
}{code}