Today I came across a cool keyword in a Sass file. It’s called ‘!default’. There was a variable declaration and then !default after it e.g.
$foo: 20px !default;
So, I decided to fine out what exactly it means. !default means the variable will be set if it has not already been set. This way, you can declare project specific values of a variable first and then add the defaults after it.
- A Sass `!default` use case. https://robots.thoughtbot.com/sass-default
There are a variety of ways to clear floats with working with html, one way being to create a div with style: clear: both after the last floated element. A more elegant way, when working with Compass, is to use clearfix. Here’s how to go about it.
Compass Clearfix | Compass Documentation. http://compass-style.org/reference/compass/utilities/general/clearfix/. 9/1/2017.