-
-
Save pedronauck/5572954 to your computer and use it in GitHub Desktop.
To enhance the legibility of texts in browsers
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
body { | |
-webkit-font-smoothing: antialiased; | |
-moz-font-smoothing: antialiased; | |
-ms-font-smoothing: antialiased; | |
font-smoothing: antialiased; | |
-moz-text-shadow: 0 0 1px rgba(0, 0, 0, 0.01); | |
-ms-text-shadow: 0 0 1px rgba(0, 0, 0, 0.01); | |
text-shadow: 0 0 1px rgba(0, 0, 0, 0.01); | |
-webkit-text-stroke: 1px transparent; | |
-moz-text-stroke: 1px transparent; | |
-ms-text-stroke: 1px transparent; | |
text-stroke: 1px transparent; | |
} |
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
// ------------------------------------------------------------- | |
// Mixins | |
// ------------------------------------------------------------- | |
// font-smothing mixin | |
@mixin font-smothing($method:antialiased) { | |
-webkit-font-smoothing: $method; | |
-moz-font-smoothing: $method; | |
-ms-font-smoothing: $method; | |
font-smoothing: $method; | |
} | |
// text-stroke mixin | |
@mixin text-stroke($size, $color) { | |
-webkit-text-stroke: $size $color; | |
-moz-text-stroke: $size $color; | |
-ms-text-stroke: $size $color; | |
text-stroke: $size $color; | |
} | |
//text-shadow mixin | |
@mixin text_shadow($hs, $vs, $br, $color){ | |
-moz-text-shadow: $hs $vs $br $color; | |
-ms-text-shadow: $hs $vs $br $color; | |
text-shadow: $hs $vs $br $color; | |
} | |
// ------------------------------------------------------------- | |
// Classes | |
// ------------------------------------------------------------- | |
body { | |
@include text-shadow(0 0 1px rgba(0, 0, 0, 0.01)); | |
@include text-stroke(1px transparent); | |
@include font-smothing; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment