Skip to content

Instantly share code, notes, and snippets.

@ianrose
Created February 12, 2015 23:26
Show Gist options
  • Save ianrose/ae516180f50f9c179d3a to your computer and use it in GitHub Desktop.
Save ianrose/ae516180f50f9c179d3a to your computer and use it in GitHub Desktop.
// This example is using Typesettings' default settings
// [1] 3 times the baseline grid value for margin-bottom.
// The second argument is the context font-size. In this case it is 1 step down in
// the modular scale.
//
// [2] Using an optional mixin, a 2px border bottom is set with padding bottom
// set to 3 times the baseline grid with 2px subtracted. By subtracting the 2px from
// the padding bottom, vertical rhythm is maintained.
//
// [3] Using an optional mixin, the line-height is set to 3 * baseline grid. Then
// the font-size is passed using our modular scale value.
.your-module {
margin-bottom: emRhythm(3, $ms-down1); //[1]
border-color: #000;
border-style: solid;
rhythmBorderBottom(2px, 3, $ms-down1); //[2]
setType(3, $ms-down1); //[3]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment