Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielnau/5880843 to your computer and use it in GitHub Desktop.
Save gabrielnau/5880843 to your computer and use it in GitHub Desktop.
@import "compass/reset"
@import "compass/typography/vertical_rhythm"
// Main baseline
$base-font-size: 20px
$base-line-height: 30px
// Alternative baseline
$alt-font-size: 10px
$alt-line-height: 15px
+establish-baseline
html
font-family: Helvetica, Arial
+debug-vertical-alignment
padding-left: 50px
padding-right: 50px
+padding-leader(2)
+padding-trailer(2)
*
box-sizing: border-box
#nav
position: fixed
top: 0
left: 0
background-color: black
+adjust-font-size-to(15px)
padding-left: 10px
padding-right: 10px
a
color: white
#main,
#alternative
float: left
width: 50%
#main
h1
+adjust-font-size-to(40px)
p
+adjust-font-size-to(16px)
+h-borders(2px, 1, 16px, solid)
border-color: red
.rhythm
height: rhythm(4, $base-font-size)
+margin-leader(1, $base-font-size)
background-color: lightgrey
#alternative
+debug-vertical-alignment(false, $alt-font-size, $alt-line-height)
h1
+adjust-font-size-to(20px, 4, $base-font-size, $alt-font-size, $alt-line-height)
p
+adjust-font-size-to(12px, 1, $base-font-size, $alt-font-size, $alt-line-height)
+h-borders(2px, 1, 12px, solid, $alt-line-height)
border-color: blue
.rhythm
height: rhythm(4, $base-font-size, 0, $alt-line-height)
+margin-leader(1, $base-font-size, $alt-line-height)
background-color: lightgrey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment