Code Editor
main.css
Web Browser
Learn
Functions and Operations

Division Can Be Special

In CSS the / character can be used as a separator. In Sass, the character is also used in division.

Here are the specific instances / counts as division:

  1. If the value, or any part of it, is stored in a variable or returned by a function.
  2. If the value is surrounded by parentheses, unless those parentheses are outside a list and the value is inside.
  3. If the value is used as part of another arithmetic expression.

Here are a few examples:

width: $variable/6; //division line-height: (600px)/9; //division margin-left: 20-10 px/ 2; //division font-size: 10px/8px; //not division
Report a Bug
If you see a bug or any other issue with this page, please report it here.