Skip to content

Instantly share code, notes, and snippets.

@jasonmelgoza
Created April 26, 2018 17:57
Show Gist options
  • Save jasonmelgoza/76944014affa13c3bdf7878937f39ca9 to your computer and use it in GitHub Desktop.
Save jasonmelgoza/76944014affa13c3bdf7878937f39ca9 to your computer and use it in GitHub Desktop.
Space variable sheet
$spacer: 8px !default;
$spacers: (
0,
round($spacer / 2),
$spacer,
$spacer * 2,
$spacer * 3,
$spacer * 4,
$spacer * 5
) !default;
// Aliases for easy use
$spacer-1: nth($spacers, 2) !default; // 4px
$spacer-2: nth($spacers, 3) !default; // 8px
$spacer-3: nth($spacers, 4) !default; // 16px
$spacer-4: nth($spacers, 5) !default; // 24px
$spacer-5: nth($spacers, 6) !default; // 32px
$spacer-6: nth($spacers, 7) !default; // 40px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment