From 66584b03d0b33507170f954009998c72fb3f7755 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 13 Jul 2023 13:26:13 -0400 Subject: [PATCH] fix: safari no longer adjusts text in landscape (#27787) Issue number: resolves #27782 --------- ## What is the current behavior? Ionic uses text-size-adjust to prevent browsers from resizing text in landscape mode in order to match native app behavior. However, WebKit only supports `-webkit-text-size-adjust`, so this fix never applied to iOS devices. https://caniuse.com/?search=text-size-adjust ## What is the new behavior? - Add `-webkit-text-size-adjust` where we use `text-size-adjust` ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information **Landscape** | main | branch | | - | - | | ![IMG_0046](https://github.com/ionic-team/ionic-framework/assets/2721089/d719f495-c051-4f64-a6fa-f17435c68cb5) | ![IMG_0048](https://github.com/ionic-team/ionic-framework/assets/2721089/7a0b5f45-b72a-466d-8e00-846de2572e49) | **Portrait** (Should be no changes) | main | branch | | - | - | | ![IMG_0045](https://github.com/ionic-team/ionic-framework/assets/2721089/a2324f9f-efcc-4c75-8359-2441f93ceadc) | ![IMG_0047](https://github.com/ionic-team/ionic-framework/assets/2721089/64566645-5778-435f-a511-5fe7234c7f65) | --- core/src/css/structure.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/css/structure.scss b/core/src/css/structure.scss index 75bed7817c..1e39d0296e 100644 --- a/core/src/css/structure.scss +++ b/core/src/css/structure.scss @@ -17,6 +17,7 @@ html { width: 100%; height: 100%; + -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } @@ -80,6 +81,7 @@ body { word-wrap: break-word; overscroll-behavior-y: none; + -webkit-text-size-adjust: none; text-size-adjust: none; }