Skip to content

Instantly share code, notes, and snippets.

@iilei
Created January 13, 2014 17:20
Show Gist options
  • Save iilei/8404143 to your computer and use it in GitHub Desktop.
Save iilei/8404143 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$usePercentage: true;
$snapTo: 640, 600, 560, 510, 460,
320, 300, 240, 220, 210,
200, 190, 180, 175, 170,
165, 160, 155, 150, 140,
135, 130, 125, 110, 105,
100, 95, 90, 85, 80, 75,
70;
$reduce: 640, 320, 300, 240;
@function unset($snapTo, $reduce){
@for $i from 1 through length($snapTo) {
$excludeMe: false;
@each $unit in $reduce {
@if($unit == nth($snapTo, $i)) {
$excludeMe: true;
}
}
@if ($excludeMe) {
/* EXCLUDE #{nth($snapTo, $i)} */
$snapTo: reject($snapTo, #{nth($snapTo, $i)});
}
}
@return $snapTo;
}
$yahoo : unset($snapTo, $reduce);
@for $i from 1 through length($yahoo) {
/* #{nth($yahoo, $i)} */
}
/* 640 */
/* 600 */
/* 560 */
/* 510 */
/* 460 */
/* 320 */
/* 300 */
/* 240 */
/* 220 */
/* 210 */
/* 200 */
/* 190 */
/* 180 */
/* 175 */
/* 170 */
/* 165 */
/* 160 */
/* 155 */
/* 150 */
/* 140 */
/* 135 */
/* 130 */
/* 125 */
/* 110 */
/* 105 */
/* 100 */
/* 95 */
/* 90 */
/* 85 */
/* 80 */
/* 75 */
/* 70 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment