Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save softcraft-development/208150 to your computer and use it in GitHub Desktop.
Save softcraft-development/208150 to your computer and use it in GitHub Desktop.
//---- SASS ----
// common code
=column_size(!size, !padding=1%)
width = !size - !padding
padding:
right = !padding
=equal_width_columns(!count)
.column
+column_size(100% / !count)
.floating_columns
overflow: auto
.column
float = left
// application-specific code example
#container
// Pass the number of columns in the container
+equal_width_columns(3)
.column
// Add additional properties here if you like (including any overrides)
//---- End SASS ----
-# ---- HAML ----
-# application-specific code example
#container.floating_columns
#first.column
First!
#second.column
Second!
#third.column
Thrid!
-# ---- End HAML ----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment