Skip to content

Commit

Permalink
fix(reset.css): avoid iOS Safari to unexpectedly zoom some font sizes (
Browse files Browse the repository at this point in the history
…#904)

* fix(reset.css): avoid iOS Safari to unexpectedly zoom some font sizes

* apply textSizeAdjust to Text components too

* fix css comment
  • Loading branch information
atabel authored Oct 4, 2023
1 parent 3ab7dd4 commit 92f7258
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions css/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: -apple-system, 'Roboto', 'Helvetica', 'Arial', sans-serif;

/* https://stackoverflow.com/questions/20924039/wrong-font-size-when-using-float-right-in-css-on-mobile-safari/22417120#22417120 */
text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
*,
*:before,
Expand Down
2 changes: 2 additions & 0 deletions src/text.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const text = style({
margin: 0, // Needed to reset the default browser margin that adds to p, h1, h2... elements.
fontSize: desktopSize,
lineHeight: desktopLineHeight,
textSizeAdjust: '100%',
WebkitTextSizeAdjust: '100%',

'@media': {
[mq.tabletOrSmaller]: {
Expand Down

1 comment on commit 92f7258

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for mistica-web ready!

✅ Preview
https://mistica-nttg7i1u6-tuentisre.vercel.app

Built with commit 92f7258.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.