Skip to content

Instantly share code, notes, and snippets.

@sndrs
Created October 27, 2014 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sndrs/21db05f2bf3d2ecd683b to your computer and use it in GitHub Desktop.
Save sndrs/21db05f2bf3d2ecd683b to your computer and use it in GitHub Desktop.
Sass class
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
// list
// $colours: (red green blue purple);
// // // loop
// @each $colour in $colours {
// .title--#{$colour} {
// color: $colour;
// font-size: 2px;
// }
// }
// for loop
@for $columns from 1 to 4 {
.columns-#{$columns} {
width: 100% / $columns;
color: fade-out(red, .3);
}
}
// maps
// $blues: (twitter: #4099FF, facebook: #3B5998);
// // @each $company, $blue in $blues {
// // .company--#{$company} {
// // content: 'Our [#{$company}] blue is #{$blue}';
// // }
// // }
// $blues: map-merge($blues, (guardian: #005689));
// @each $company, $blue in $blues {
// .company--#{$company} {
// content: 'Our [#{$company}] blue is #{$blue}';
// }
// }
.columns-1 {
width: 100%;
color: rgba(255, 0, 0, 0.7);
}
.columns-2 {
width: 50%;
color: rgba(255, 0, 0, 0.7);
}
.columns-3 {
width: 33.3333333333%;
color: rgba(255, 0, 0, 0.7);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment