Created
June 27, 2013 22:08
-
-
Save gabrielnau/5880843 to your computer and use it in GitHub Desktop.
Snippet of code used in http://compass-vertical-rhythm.locomotivehosting.com to test this patch https://github.com/gabrielnau/compass/commit/eb1f9e7a6a2113a7e9c21d498cd9105cabde8dcb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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