Skip to content

Instantly share code, notes, and snippets.

@eric-mathison
Created May 15, 2020 17:15
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 eric-mathison/820ed298fb168c0ab36f0192926a2c70 to your computer and use it in GitHub Desktop.
Save eric-mathison/820ed298fb168c0ab36f0192926a2c70 to your computer and use it in GitHub Desktop.
SASS helper for border widths
// Specify widths (in px) for available borders
$widths: (1, 2, 3, 4, 5, 6, 7, 8);
@each $width in $widths {
.bw-#{$width} {
border-width: #{$width}px !important;
}
}
// Generated CSS for above script
.bw-1 {
border-width: 1px !important;
}
.bw-2 {
border-width: 2px !important;
}
.bw-3 {
border-width: 3px !important;
}
.bw-4 {
border-width: 4px !important;
}
.bw-5 {
border-width: 5px !important;
}
.bw-6 {
border-width: 6px !important;
}
.bw-7 {
border-width: 7px !important;
}
.bw-8 {
border-width: 8px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment