Skip to content

Instantly share code, notes, and snippets.

@kovtunos
Created July 19, 2016 12:10
Show Gist options
  • Save kovtunos/1095950f74bc893f8e9ccf198de87fb0 to your computer and use it in GitHub Desktop.
Save kovtunos/1095950f74bc893f8e9ccf198de87fb0 to your computer and use it in GitHub Desktop.
Dotted underline border #mixin
// Dotted underline border.
// https://jsfiddle.net/xandeadx/n16294kk/1/
//
// Usage:
// @include dotted-border;
// @include dotted-border(#bebebe, 3px);
// @include dotted-border(#bebebe, 1px, 3px);
@mixin dotted-border($color: #000, $dot-width: 1px, $separator-width: 1px) {
background-image: linear-gradient(to right, $color $dot-width, transparent $dot-width);
background-position: 0 bottom;
background-repeat: repeat-x;
background-size: ($separator-width + $dot-width) 1px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment