Skip to content

Instantly share code, notes, and snippets.

@brandonb927
Forked from ddemaree/_retina.scss
Last active December 15, 2017 20:02
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save brandonb927/5500527 to your computer and use it in GitHub Desktop.
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