Home > Enterprise >  calc function in scss or css is not working
calc function in scss or css is not working

Time:04-14

Could someone tell me what this line of code is doing in a css file?

width: calc(100% - - -10px)

the line was originally from a less file. I had the file converted to scss file. The line was unchanged, but not working on the browser after i compiled it.

I checked the docs for calc function, still couldn't figure out what the statement is doing. Please help.

CodePudding user response:

It looks like it should be this instead:

width: calc(100% -10px)

Which sets the width to 100% of its parent, minus 10 pixels.

  • Related