Skip to content

Commit

Permalink
css: fix rendering on mobile Safari
Browse files Browse the repository at this point in the history
It turns out that when only "Roboto" is imported, browsers have to use a
"faux style" for the bold version of Roboto, by applying transforms to
the stroke width and text offset (I'm not sure if those are the correct
technical terms, but so be it). This resulted in Roboto headings looking
really weird in mobile Safari.

The fix is to actually download the font for all font weights/styles I
intend to use, i.e. actually download the bold version of Roboto.
  • Loading branch information
sxlijin committed Jan 25, 2024
1 parent b8aa620 commit a046602
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scss/base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import url('https://fonts.googleapis.com/css?family=Roboto');
@import url('https://fonts.googleapis.com/css2?family=Roboto');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700');

/* adobe color wheel: #e81c50 #c672c8 #743ba3 #10008c #3a6ad8 */

Expand Down

0 comments on commit a046602

Please sign in to comment.