Dark Launch

Sass add, subtract, multiply, and divide values

Use math in sass stylesheets. Input with a file named style.css.

CSS
.selector {
  $width: 200;
  $padding: 10;
 
  padding: #{$padding}px;
  right: -#{$width}px;
  width: #{$width - (2 * $padding)}px;
}

Use sass command to watch for file changes in style.scss and compile into style.css.

Bash
$ sass --sourcemap="none" --style "expanded" --unix-newlines --watch "style.scss:style.css"
CSS
.selector {
  padding: 10px;
  right: -200px;
  width: 180px;
}