Created
January 27, 2013 20:36
-
-
Save tsi/4650340 to your computer and use it in GitHub Desktop.
Comparing Sass vs CSS layout systems - using SCSS
This file contains hidden or 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
// 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