SCSS Operators

SCSS Math Operators like '+', '-', '*', '/' and '%' are used to do simple mathematical calculations in your CSS.

Code Structure:
.container{
  width: 100%;
}

.content{
  float: left;
  width: 600px / 960px * 100%;
}

.aside{
  float: right;
  width: 300px / 960px * 100%;
}

Result:
.container{
  width: 100%;
}

.content{
  float: left;
  width: 62.5%;
}

.aside{
  float: right;
  width: 31.25;
}

Share this

Related Posts