SASS Operations

PHOTO EMBED

Fri Jan 21 2022 14:57:49 GMT+0000 (Coordinated Universal Time)

Saved by @Sebhart #css #sass

/* 
Although vanilla CSS now also offers this feature in the form of calc(), the Sass alternative is quicker to write, has the modulo % operation, and can be applied to a wider range of data-types (e.g. colors and strings). 
*/

$width: 800px;

.container { 
  width: $width;
}

.column-half {
  width: $width / 2;
}

.column-fifth {
  width: $width / 5;
}
content_copyCOPY

https://tutorialzine.com/2016/01/learn-sass-in-15-minutes