Created
April 3, 2019 10:30
-
-
Save idiazroncero/7b9b99e8fe558564e09b9f0aec4c248f to your computer and use it in GitHub Desktop.
Mixin for setting a text-stroke, including fallback.
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 text-border($color) { | |
color: transparent !important; | |
text-shadow: | |
-1px -1px 0 $color, | |
1px -1px 0 $color, | |
-1px 1px 0 $color, | |
1px 1px 0 $color; | |
@at-root { | |
@supports (-webkit-text-stroke: 1px $color) { | |
& { | |
text-stroke: 1px $color; | |
-webkit-text-stroke: 0.5px $color; | |
text-shadow:none; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment