Trimming of white-spaces in CSS code

Omnis LuxOmnis Lux Registered Users Posts: 8 Big grins
edited October 21, 2016 in SmugMug Support
Hi all.
I posted this topic under bug-report but did not get any response, so I'll try here.

SmugMug apparently removes all white-spaces from the code in CSS content-blocks, and this has led to an unexpected problem to me.
I'm trying to use the calc()-function, e.g:

font-size: calc(2vw + 12px);

But when published, this code ends up as:

font-size:calc(2vw+12px);

and the browsers ignores the code. According to the CSS3 specification for the calc()-function, the "white space is required on both sides of the + and - operators. (The * and / operaters can be used without white space around them.)" - likely to differentiate between operators and signed numbers.

I realize that the removal of white-spaces in the CSS-code is not a bug, but intentional (to save space), but I'm not as sure that SmugMug is aware of the potential problems this can lead to with not complying to the CSS specifications under certain circumstances.

Any thoughts or ideas on this, as I really want to use the calc()-function with both '+' and '-' operators?

Comments

Sign In or Register to comment.