Make a custom dashed border with SASS
//custom dashed border
@mixin dashed-border($dashlength, $spacelength, $borderwidth, $color, $position: top) {
$per: percentage($dashlength / ($dashlength + $spacelength));
background-image: linear-gradient(to right, $color 0%, $color $per, rgba(0, 0, 0, 0) $per);
background-position: 0 $position;
background-size: ($dashlength + $spacelength) $borderwidth;
background-repeat: repeat-x;
}
Written by voodoocode
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#