Skip to content

Instantly share code, notes, and snippets.

@tsi
Created January 27, 2013 20:36
Show Gist options
  • Save tsi/4650340 to your computer and use it in GitHub Desktop.
Save tsi/4650340 to your computer and use it in GitHub Desktop.
Comparing Sass vs CSS layout systems - using SCSS
// With Salsa
//
// Using a Sass based system, my mark-up can look something like this:
//
// <article></article>
// <aside><aside>
//
// and in my scss file, I'll do
@import "settings";
article {
@include span($article-width);
}
aside {
@include span($sidebar-width);
}
// GO FULL WIDTH
@media only screen and (max-width: $small) {
article {
@include span(100%);
}
aside {
@include span(100%);
}
}
// I don't even need classes.
// and to make it even better, my @media query value and my elements widths
// were set in my settings partial where I can manage color schemes,
// directionality, media-queries break-points etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment