Skip to content

Instantly share code, notes, and snippets.

@iamcarrico
Created April 1, 2015 20:52
Show Gist options
  • Save iamcarrico/b2e30cc46a6e1b22522e to your computer and use it in GitHub Desktop.
Save iamcarrico/b2e30cc46a6e1b22522e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.19)
// Compass (v0.12.7)
// ----
$byline: (
font-size 10px,
font-size--large 15px,
font-size--small 8px,
width 200px,
width--large 250px
);
@function get($list, $key, $keyword: null) {
$keys: ();
@each $pair in $list {
$keys: append($keys, nth($pair, 1));
}
@if $keyword {
$key: $key + '--' + $keyword;
}
$value: nth(nth($list, index($keys, $key)), 2);
@return $value;
}
body {
width: get($byline, width, large);
}
body {
width: 250px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment