Close
AlgoliaLogoLight
Close full mode
logo

CSS calc function

Git RepositoryEdit on Github

How to use Sass variable in CSS calc function

  • We need to use Sass Interpolation.
  • Example SCSS (Syntactically Awesome Style SheetS) code:
$body-padding: 20px;
body {
height: calc(100% - #{$body-padding});
}
Loading comments...