Last active
April 3, 2018 01:48
-
-
Save wesley6j/0a1b8bda0c9eb4880c4d490365e46424 to your computer and use it in GitHub Desktop.
mixin for css flag https://codepen.io/zdoug/pen/mOVdZN?page=1&
This file contains hidden or 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 flag-variant($height, $bg) { | |
display: block; | |
background:$bg; | |
position: relative; | |
line-height: $height; | |
font-size: $height*.5; | |
&::before, | |
&::after { | |
content: ""; | |
position: absolute; | |
left: 100%; | |
width: 0; | |
height: 0; | |
border-style: solid; | |
display: block; | |
} | |
&::before { | |
top: 0; | |
border-width: $height*.6 $height*.5 $height*.2 0; | |
border-color: $bg transparent transparent transparent; | |
} | |
&::after { | |
bottom: 0; | |
border-width: $height*.2 $height*.5 $height*.6 0; | |
border-color: transparent transparent $bg transparent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment