Typography: add conditional to antialiased usage #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd like to propose adding a conditional when using
-webkit-font-smoothing: antialiased
andtext-rendering: optimizeLegibility
for better typography legibility.Recently, I learned that this might cause the opposite result when applied to light themes, where a dark text is on a light background. Research more about this stop, I came across this amazing article that argues that designers and front-end developers should stop using it as a fix and deliberate its usage only when is necessary, meaning stop using it as a go-for solution and only add that when fonts were not designed to full all pixes properly.
Here's an example with antialiased text in both contexts (light/dark themes). You can see that the second column on a light theme doesn't have great legibility like the non-antialiased version. While this is still subjective, I would not recommend it as a standard practice since it is not a default behavior on browsers.