I have an element in which I need to add 10 pixels (10px) to a percentage (100%). I'm using the built CSS calc() function which should do the trick, however it seems to be causing a problem when used in conjunction with LESS CSS.
I have looked at this answer and it doesn't fix the issue. I couldn't find a scenario where anyone uses a plus symbol so I can't find an answer anywhere. The only examples are of minus symbols by used instead which is not what I need.
This is my code:
.element { width: ~"calc(100% + 10px)"; }
Which is output as:
.element { width: calc(100%+10px); }
In Chrome...
The reason it doesn't work is because it needs spaces around the plus symbol. How can I get this to work? There doesn't seem to be a way to retain the spaces.