Last active
December 21, 2015 04:18
-
-
Save ttamminen/6248177 to your computer and use it in GitHub Desktop.
Sass mixin to create vertical divider.
Divider height will be same as previous container that is set position: relative.
Working demo can be found from http://jsfiddle.net/ttamminen/dzHDQ/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin vertical-divider( | |
$primaryColor: #eee, | |
$secondaryColor: #aaa, | |
$dividerWidth: 2px) | |
{ | |
width: 1px; | |
height: 1px; | |
&:after { | |
content: ""; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
width: 2px; | |
border-left: $dividerWidth solid $primaryColor; | |
background-color: $secondaryColor; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment