Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sass 101 - A newb's guide: operations

All types support equality operations (== and !=). In addition, each type has its own operations that it has special support for.

SassScript supports the standard arithmetic operations on numbers (+, -, *, /, %), and will automatically convert between units if it can.

Relational operators (<, >, <=, >=) are also supported for numbers, and equality operators (==, !=) are supported for all types.

operations.scss

block {
font-size: 12 / 16 * 1em;
width: 500 / 16 * 1em;
padding: 20 / 16 * 1em;
margin: 25 * 1%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment