Files
ionic-framework/core/src/components/modal/modal.scss
Manu MA 235c6859d2 feat(modal): add css vars (#16605)
* feat(modal): add css vars

* add more css vars

* add docs

* add background

* fix e2e test
2018-12-06 15:36:09 +01:00

69 lines
1.7 KiB
SCSS

@import "./modal.vars";
// Modals
// --------------------------------------------------
:host {
/**
* @prop --background: Background of the modal content
* @prop --border-color: Border color of the modal content
* @prop --border-radius: Border radius of the modal content
* @prop --border-width: Border width of the modal content
* @prop --border-style: Border style of the modal content
* @prop --height: Height of the modal content
* @prop --width: Width of the modal content
*/
--width: 100%;
--height: 100%;
--overflow: hidden;
--border-radius: 0;
--border-width: 0;
--border-style: none;
--border-color: transparent;
--background: #{$background-color};
@include position(0, 0, 0, 0);
display: flex;
position: absolute;
align-items: center;
justify-content: center;
contain: strict;
}
.modal-wrapper {
@include border-radius(var(--border-radius));
width: var(--width);
height: var(--height);
border-width: var(--border-width);
border-style: var(--border-style);
border-color: var(--border-color);
background: var(--background);
overflow: var(--overflow);
z-index: 10;
}
@media only screen and (min-width: $modal-inset-min-width) and (min-height: $modal-inset-min-height-small) {
:host {
--width: #{$modal-inset-width};
--height: #{$modal-inset-height-small};
--ion-safe-area-top: 0px;
--ion-safe-area-bottom: 0px;
--ion-safe-area-right: 0px;
--ion-safe-area-left: 0px;
}
}
@media only screen and (min-width: $modal-inset-min-width) and (min-height: $modal-inset-min-height-large) {
:host {
--width: #{$modal-inset-width};
--height: #{$modal-inset-height-large};
}
}