Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Retina font-weight for thin fonts in HiDPI typography
@import "retina.less";
.body-text {
.retina-font-weight();
}
.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