Skip to content

Instantly share code, notes, and snippets.

@ikonikre
Last active November 8, 2016 16:33
Show Gist options
  • Save ikonikre/16dc5f8a20517696370fc04316400385 to your computer and use it in GitHub Desktop.
Save ikonikre/16dc5f8a20517696370fc04316400385 to your computer and use it in GitHub Desktop.
Bootstrap 4 spacer variables with sizes 'half' and '4' included.

Spacer functions for Bootstrap 4 α3

The spacer functions include these measurements:

  • 0.5 => m-*-h
  • 1 => m-*-1
  • 1.5 => m-*-1h
  • 2 => m-*-2
  • 3 => m-*-3
  • 4 => m-*-4
  • 5 => m-*-5
// Spacer
//
// Control the default styling of most Bootstrap elements by modifying these
// variables. Mostly focused on spacing.
$spacer: 1rem !default;
$spacer-x: $spacer !default;
$spacer-y: $spacer !default;
$spacers: (
0: (
x: 0,
y: 0
),
h: (
x: ($spacer-x * 0.5),
y: ($spacer-y * 0.5)
),
1: (
x: $spacer-x,
y: $spacer-y
),
1h: (
x: ($spacer-x * 1.5),
y: ($spacer-y * 1.5)
),
2: (
x: ($spacer-x * 2),
y: ($spacer-y * 2)
),
3: (
x: ($spacer-x * 3),
y: ($spacer-y * 3)
),
4: (
x: ($spacer-x * 4),
y: ($spacer-y * 4)
),
5: (
x: ($spacer-x * 5),
y: ($spacer-y * 5)
),
) !default;
$border-width: thin !default;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment