stylesheets/library/_typography.sass
69379ab0
 !base_font_size ||= 16px
 !small ||= floor(!base_font_size * .85)
 !big ||= floor(!base_font_size * 1.25)
8867d7c5
 !base_font_color ||= #333
c94e6f53
 !h6 = ceil(!base_font_size*1.3)
 !h5 = ceil(!base_font_size*1.4)
 !h4 = ceil(!base_font_size*1.7)
 !h3 = ceil(!base_font_size*1.9)
 !h2 = ceil(!base_font_size*2.2)
 !h1 = ceil(!base_font_size*2.5)
 
 =heading-font 
   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
 =sans-font
   font-family: "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", Helvetica, Arial, Verdana, sans-serif
 =serif-font
6b9c3af4
   font-family: Georgia, Times, "Times New Roman", serif
c94e6f53
 =fixed-font
   font-family: "Menlo", "Bitstream Vera Sans", Monaco, "Andale Mono", "Lucida Console", monospace
1eddd60a
 =mono-font
   +fixed-font
c94e6f53
 
 =general-typography(!font_size = !base_font_size)
   +set-heading-sizes(!font_size)
   +typography-defaults(!font_size)
d8d51719
 
 =set-heading-sizes(!font_size = !base_font_size)
c94e6f53
   !h6 = ceil(!font_size*1.3)
   !h5 = ceil(!font_size*1.4)
   !h4 = ceil(!font_size*1.7)
   !h3 = ceil(!font_size*1.9)
   !h2 = ceil(!font_size*2.2)
   !h1 = ceil(!font_size*2.5)
d8d51719
   h1, h2, h3, h4
     &:first-child
       margin-top: 0
   h1
     font-size= !h1
c94e6f53
     margin-bottom= !font_size * .765
     line-height= !h1 * 1.625
d8d51719
   h2
     font-size= !h2
c94e6f53
     margin-bottom= !font_size * .855
     line-height= !h2 * 1.625
d8d51719
   h3
     font-size= !h3
c94e6f53
     margin-bottom= !font_size * .956
     line-height= !h3 * 1.625
d8d51719
   h4
     font-size= !h4
c94e6f53
     margin-bottom= !font_size * 1.161
     line-height= !h4 * 1.625
d8d51719
   h5
     font-size= !h5
c94e6f53
     margin-bottom= !font_size * 1.238
     line-height= !h5 * 1.625
d8d51719
   h6
     font-size= !h6
c94e6f53
     margin-bottom= !font_size * 1.625
     line-height= !h6 * 1.625
d8d51719
 
 =typography-defaults(!font_size = !base_font_size)
c94e6f53
   body
6c9f1567
     line-height: 1.625em
8867d7c5
     color= !base_font_color
d8d51719
   p
c94e6f53
     +p-style(!font_size)
8867d7c5
   table
     +table-style(!font_size)
   ol
     +ol-style(!font_size)
   ul
     +ul-style(!font_size)
   dl
     +dl-style(!font_size)
   blockquote
     +quote-style
f17271f6
   q
     font-style: italic
     &:before
       content: "\201C"
     &:after
       content: "\201D"
c94e6f53
   em, dfn
d8d51719
     font-style: italic
c94e6f53
   strong, dfn
d8d51719
     font-weight: bold
c94e6f53
   del
     text-decoration: line-through
d8d51719
   span.highlight, em.highlight, strong.highlight
     background-color: #ff6
     padding: 2px
     margin: 0 -2px
c94e6f53
   abbr, acronym
     border-bottom: 1px dotted
8867d7c5
     cursor: help
c94e6f53
   address
     margin-top= !font_size * 1.625
     font-style: italic
   pre, code
     margin= !font_size * 1.625 0
     white-space: pre
   pre, code, tt
     +fixed-font
     line-height= !font_size * 1.5
   tt
     display: block
     margin= !font_size * 1.625 0
f17271f6
   sub, sup
     line-height: 0
c94e6f53
   hr
     margin-bottom= !font_size * 1.625
   
69379ab0
   small, .small
d8d51719
     font-size= floor(!font_size * .85)
69379ab0
   big, .big
c94e6f53
     font-size= floor(!font_size * 1.25)
 
8867d7c5
 =ol-style(!font_size = !base_font_size)
   list-style: outside
   margin= 0 0 !font_size * 1.625
   li
     list-style: decimal
     ol
       margin= 0 0 !font_size * 1.625
       
 =ul-style(!font_size = !base_font_size)
   list-style: outside
   margin= 0 0 !font_size * 1.625
   li ul
     margin= 0 0 !font_size * 1.625
     
 =dl-style(!font_size = !base_font_size)
   margin= 0 0 !font_size * 1.625
   dt
     font-weight: bold
   dd
     margin-left= !font_size * 1.625
 
 =quote-style(!font_size = !base_font_size)
f6367715
   padding= !font_size*1.5 !font_size*1.5 !font_size * 1.5 !font_size * 1.8
   position: relative
   margin-bottom= !font_size * 0.8125 
8867d7c5
   &:before
     content: "\201C"
     font-size= !font_size * 3
f6367715
     margin= 5px 0 0 -.525em
8867d7c5
     position: absolute
     font-family: Times, Georgia, serif
     line-height: 0
   > p
     padding: 0
     margin: 0
     
c94e6f53
 =p-style(!font_size = !base_font_size)
   padding-bottom= !font_size * 0.8125
   img
     float: left
     margin:
       top= !font_size * .5
       right= !font_size * .8125
       bottom= !font_size* .8125
       left= 0
     padding: 0
     &.right
       margin:
         right= 0
8867d7c5
         left= !font_size * .8125
 
 =table-style(!font_size = !base_font_size)
   margin= 0 0 !font_size * 1.625
   border-collapse: collapse
   th
     font-weight: bold
   tr, th, td
     margin: 0
     padding= 0 !font_size * 1.625 0 !font_size
   tfoot
     font-style: italic
   caption
     text-align: center