Search code examples
cssipadwebkitios13dynamic-type-feature

-webkit-text-size-adjust not working on iPad OS 13


<!DOCTYPE html>
        <html>
            <body>
                <div style="-webkit-text-size-adjust: 56.2962293624878%;">
                    Sample text sample text sample text
                </div>
                <div style="-webkit-text-size-adjust: 156.2962293624878%;">
                    Sample text sample text sample text
                </div>
                <div style="-webkit-text-size-adjust: 356.2962293624878%;">
                    Sample text sample text sample text
                </div>
            </body>
        </html>

As described in https://bugs.webkit.org/show_bug.cgi?id=201404, -webkit-text-size-adjust is not working on iPad running iOS 13. Any idea what can be used as a replacement for this? I'm using webkit-text-size-adjust to handle dynamic types (1).


Solution

  • WebKit has fixed the issue. See - https://bugs.webkit.org/show_bug.cgi?id=212122.

    Note that preferredContentMode should be set to WKContentMobile -> webViewConfiguration.defaultWebpagePreferences.preferredContentMode = WKContentModeMobile