MOBILE-3103 style: Fix zoom texts on iOS

main
Pau Ferrer Ocaña 2021-10-07 11:26:08 +02:00
parent f1f94228b7
commit 32fc43875c
3 changed files with 16 additions and 3 deletions

View File

@ -388,8 +388,8 @@ export class CoreSettingsHelperProvider {
*/
applyZoomLevel(zoomLevel: CoreZoomLevel): void {
const zoom = CoreConstants.CONFIG.zoomlevels[zoomLevel];
// @todo MOBILE-3790 non-standard property, doesn't work everywhere.
document.documentElement.style.zoom = zoom + '%';
document.documentElement.style.setProperty('--zoom-level', zoom + '%');
}
/**

View File

@ -1,7 +1,19 @@
@import "./globals.scss";
html.force-safe-area-margins {
--ion-safe-area-left: 40px;
--ion-safe-area-right: 40px;
--ion-safe-area-top: 40px;
--ion-safe-area-bottom: 40px;
}
// @todo MOBILE-3790 non-standard property, doesn't work everywhere.
html {
zoom: var(--zoom-level);
}
body {
-webkit-text-size-adjust: auto;
-webkit-text-size-adjust: var(--zoom-level);
}
// Common styles.

View File

@ -61,6 +61,7 @@
--a11y-min-target-size: 44px;
--a11y-focus-color: var(--primary);
--a11y-focus-width: 2px;
--zoom-level: 100%;
--module-icon-size: 24px;