mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +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,5 +1,6 @@
|
||||
import { Component, ComponentInterface, Event, EventEmitter, Listen, Prop } from '@stencil/core';
|
||||
|
||||
import { Mode } from '../../interface';
|
||||
import { GESTURE_CONTROLLER } from '../../utils/gesture';
|
||||
import { now } from '../../utils/helpers';
|
||||
|
||||
@ -12,6 +13,7 @@ import { now } from '../../utils/helpers';
|
||||
shadow: true
|
||||
})
|
||||
export class Backdrop implements ComponentInterface {
|
||||
mode!: Mode;
|
||||
|
||||
private lastClick = -10000;
|
||||
private blocker = GESTURE_CONTROLLER.createBlocker({
|
||||
@ -78,6 +80,7 @@ export class Backdrop implements ComponentInterface {
|
||||
return {
|
||||
tabindex: '-1',
|
||||
class: {
|
||||
[`${this.mode}`]: true,
|
||||
'backdrop-hide': !this.visible,
|
||||
'backdrop-no-tappable': !this.tappable,
|
||||
}
|
||||
|
Reference in New Issue
Block a user