-
-
Save brandonb927/5500527 to your computer and use it in GitHub Desktop.
Retina font-weight for thin fonts in HiDPI typography
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
@import "retina.less"; | |
.body-text { | |
.retina-font-weight(); | |
} |
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
.retina-font-weight(@ratio: 1.25) { | |
@dpi : @ratio * 96; | |
font-weight: normal; | |
@media only screen and (-webkit-min-device-pixel-ratio: @ratio), | |
only screen and (min-device-pixel-ratio: @ratio), | |
only screen and (min-resolution: ~'@{dpi}dpi') { | |
font-weight: 300; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment