SCSS Math Operators
For improved readability, wrap all math operations in parentheses with a single space between values, variables, and operators.
// Bad example
.element {
margin: 10px 0 @variable*2 10px;
}
// Good example
.element {
margin: 10px 0 (@variable * 2) 10px;
}
More Stylesheets tutorials
-
SCSS Nesting
Best practices for writing easy to maintain stylesheets.
-
CSS Syntax
Best practices for writing easy to maintain stylesheets.
-
CSS Shorthand Notation
Best practices for writing easy to maintain stylesheets.
-
CSS Selectors
Best practices for writing easy to maintain stylesheets.
-
CSS Media Queries
Best practices for media queries inside your stylesheets.
-
CSS Declaration Order
Best practices for order of declarations inside stylesheet elements.
-
CSS Class Names
Best practices for writing easy to maintain stylesheets.
-
Code Comments
Best practices for writing easy to maintain code.
-
SCSS Extend and Mixin
Best practices for writing easy to maintain stylesheets.