mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(components): include mode classes on components for use in shadow (#17838)
- removes mode-less component classes from the internal CSS, use element instead - adds mode specific classes `md` or `ios` for styling inside of shadow components - adds e2e test that verifies mode classes exist on all ionic components, plus checks for specific classes that the components need for internal styling fixes #17608
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { Component, ComponentInterface, Element, Prop, QueueApi } from '@stencil/core';
|
||||
|
||||
import { Config } from '../../interface';
|
||||
import { Config, Mode } from '../../interface';
|
||||
import { rIC } from '../../utils/helpers';
|
||||
import { isPlatform } from '../../utils/platform';
|
||||
|
||||
@ -9,6 +9,7 @@ import { isPlatform } from '../../utils/platform';
|
||||
styleUrl: 'app.scss'
|
||||
})
|
||||
export class App implements ComponentInterface {
|
||||
mode!: Mode;
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
@ -34,6 +35,7 @@ export class App implements ComponentInterface {
|
||||
hostData() {
|
||||
return {
|
||||
class: {
|
||||
[`${this.mode}`]: true,
|
||||
'ion-page': true,
|
||||
'force-statusbar-padding': this.config.getBoolean('_forceStatusbarPadding')
|
||||
}
|
||||
|
Reference in New Issue
Block a user