Posting the solution for future reference.
There are two steps to complete this and 'overwrite the $em-base
' globally:
1. Add the new variable.
This can be done after importing bourbon/neat by using the !global
flag.
//Import Plugins
@import "bourbon"
@import "neat"
//Overwrite $em-base
$em-base: 14px !global;
2. Make sure the new $em-base variable is used to overwrite the font-size.
//Set font-size
html,
body {
font-size: $em-base; //14px
}
You can now use the bourbon em-function to correctly size with em
.
!! It is important to make sure that the font size is set on the root element - (HTML
), this is the element that defines the pixel size of the em.
Here is a Pen http://codepen.io/matthewelsom/pen/WQPgQq