Skip to content

Instantly share code, notes, and snippets.

@idiazroncero
Created April 3, 2019 10:30
Show Gist options
  • Save idiazroncero/7b9b99e8fe558564e09b9f0aec4c248f to your computer and use it in GitHub Desktop.
Save idiazroncero/7b9b99e8fe558564e09b9f0aec4c248f to your computer and use it in GitHub Desktop.
Mixin for setting a text-stroke, including fallback.
@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