Skip to content

Instantly share code, notes, and snippets.

@roscabgdn
Created March 2, 2016 07:36
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 roscabgdn/a1ec7c88d5b9a49fc13e to your computer and use it in GitHub Desktop.
Save roscabgdn/a1ec7c88d5b9a49fc13e to your computer and use it in GitHub Desktop.
// Title Border
// Apply a short border beneath a title
// Usage @mixin title-border(color);
@mixin title-border($color, $height, $width, $position) {
@if $position == center {
$position: 0 auto;
} @else {
$position: 0;
}
&:after {
border-bottom: $height solid $color;
content: '';
display: block;
margin: $position;
padding-bottom: rem(15);
width: $width;
}
}
//Use Case:
.h1 {
@include title-border($color, rem(5), rem(85), left);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment