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:
Brandy Carney
2019-04-16 17:28:21 -04:00
committed by GitHub
parent 38ae3620a2
commit e5c8c10029
93 changed files with 685 additions and 119 deletions

View File

@ -2,7 +2,7 @@ import { Component, ComponentInterface, Element, Event, EventEmitter, Listen, Me
import { Animation, AnimationBuilder, Config, CssClassMap, Mode, OverlayEventDetail, OverlayInterface, PickerButton, PickerColumn } from '../../interface';
import { dismiss, eventMethod, present } from '../../utils/overlays';
import { createThemedClasses, getClassMap } from '../../utils/theme';
import { getClassMap } from '../../utils/theme';
import { iosEnterAnimation } from './animations/ios.enter';
import { iosLeaveAnimation } from './animations/ios.leave';
@ -204,7 +204,11 @@ export class Picker implements ComponentInterface, OverlayInterface {
return {
'aria-modal': 'true',
class: {
...createThemedClasses(this.mode, 'picker'),
[`${this.mode}`]: true,
// Used internally for styling
[`picker-${this.mode}`]: true,
...getClassMap(this.cssClass)
},
style: {