diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f368628ec..dec433beb 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -51,11 +51,17 @@ export class MoodleMobileApp implements OnInit { keyboard.hideFormAccessoryBar(false); - let desktopClass = this.appProvider.isDesktop() ? 'platform-desktop' : ''; - desktopClass += this.appProvider.isMac() ? ' platform-mac' : ''; - desktopClass += this.appProvider.isLinux() ? ' platform-linux' : ''; - desktopClass += this.appProvider.isWindows() ? ' platform-windows' : ''; - desktopClass != '' ? app.setElementClass(desktopClass, true) : false; + if (this.appProvider.isDesktop()) { + app.setElementClass('platform-desktop', true); + + if (this.appProvider.isMac()) { + app.setElementClass('platform-mac', true); + } else if (this.appProvider.isLinux()) { + app.setElementClass('platform-linux', true); + } else if (this.appProvider.isWindows()) { + app.setElementClass('platform-windows', true); + } + } }); } diff --git a/src/app/app.scss b/src/app/app.scss index fa548765c..508268db3 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -968,3 +968,16 @@ ion-modal, .split-pane { contain: size layout style; } + +// Styles for desktop apps only. +ion-app.platform-desktop { + video::-webkit-media-text-track-display { + white-space: normal !important; + } + + &.platform-windows { + video::-webkit-media-text-track-display { + font-size: 0.6em; + } + } +}