From 2775be7dc780da96a6324d67c9831d7191c1b7f0 Mon Sep 17 00:00:00 2001 From: Ives van Hoorne Date: Fri, 8 Nov 2019 13:54:22 +0100 Subject: [PATCH] Default to subpixel for non-retina screens --- packages/common/src/global.css | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/common/src/global.css b/packages/common/src/global.css index 83a80e95a4b..2cab0d7a97f 100644 --- a/packages/common/src/global.css +++ b/packages/common/src/global.css @@ -1,10 +1,10 @@ html, body { font-family: 'Roboto', sans-serif; - -webkit-font-smoothing: antialiased; - -moz-font-smoothing: antialiased; + -webkit-font-smoothing: auto; + -moz-font-smoothing: auto; -moz-osx-font-smoothing: grayscale; - font-smoothing: antialiased; + font-smoothing: auto; text-rendering: optimizeLegibility; font-smooth: always; -webkit-tap-highlight-color: transparent; @@ -82,5 +82,14 @@ a { **/ body * { box-sizing: initial; - -webkit-font-smoothing: antialiased; + -webkit-font-smoothing: auto; +} + +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + /* On Retina the pixel density is so high that we can do anti-aliasing instead of + subpixel anti-aliasing and it will look more beautiful (star) + */ + body * { + -webkit-font-smoothing: antialiased; + } }