Skip to content

Instantly share code, notes, and snippets.

@pedrogpimenta
Created March 3, 2017 15:12
Show Gist options
  • Save pedrogpimenta/b17c0306252414986f80cfe9a8f2df61 to your computer and use it in GitHub Desktop.
Save pedrogpimenta/b17c0306252414986f80cfe9a8f2df61 to your computer and use it in GitHub Desktop.
Simple SASS grid/columns using mixins
=row()
font-size: 0
=col($col, $sum, $gap: 1em, $align: top, $first: false, $last: false)
width: percentage($col/$sum)
vertical-align: $align
font-size: $base-font-size
display: inline-block
@if $first == false
padding-left: $gap
@if $last == false
padding-right: $gap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment