From 7f09b925bd093e7970e183f39dc73f3c32e9e466 Mon Sep 17 00:00:00 2001 From: Igor Randjelovic Date: Mon, 19 Jun 2023 21:43:08 +0200 Subject: [PATCH] fix(Application): orientation & systemAppearance root classes --- packages/core/application/application-common.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/core/application/application-common.ts b/packages/core/application/application-common.ts index 9977a8dc3..d4abab254 100644 --- a/packages/core/application/application-common.ts +++ b/packages/core/application/application-common.ts @@ -233,6 +233,8 @@ export class ApplicationCommon { private setRootViewCSSClasses(rootView: View): void { const platform = Device.os.toLowerCase(); const deviceType = Device.deviceType.toLowerCase(); + const orientation = this.orientation(); + const systemAppearance = this.systemAppearance(); if (platform) { CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${platform}`); @@ -242,12 +244,12 @@ export class ApplicationCommon { CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${deviceType}`); } - if (this.orientation) { - CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${this.orientation}`); + if (orientation) { + CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${orientation}`); } - if (this.systemAppearance) { - CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${this.systemAppearance}`); + if (systemAppearance) { + CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${systemAppearance}`); } rootView.cssClasses.add(CSSUtils.ROOT_VIEW_CSS_CLASS);