discourse/app/assets/stylesheets/mobile/modal.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

87 lines
1.5 KiB
SCSS
Raw Normal View History

2013-09-06 03:37:07 +08:00
// base styles for every modal popup used in Discourse
.d-modal {
&__container {
width: 100%;
max-width: 100%;
}
// fixes modal placement on Android when keyboard is visible
html.keyboard-visible:not(.ios-device) & {
height: calc(100% - env(keyboard-inset-height));
.d-modal__container {
max-height: 100%;
}
}
}
//legacy
.modal-open #main {
overflow: hidden;
}
2014-03-13 11:17:18 +08:00
2013-09-06 03:37:07 +08:00
.modal-middle-container {
2014-03-07 12:55:57 +08:00
max-width: 100%;
margin-bottom: 30px; // For iOS Safari issues
2013-09-06 03:37:07 +08:00
}
// Hardcode to be the same as before for now. I would recommend not using bootbox, or finding a way so the html structure can be the same
.bootbox.modal {
top: 10%;
width: 100%;
}
2020-02-22 04:44:34 +08:00
.modal {
&.fade {
transition: opacity 0.3s linear, top 0.3s ease-out;
top: -25%;
}
&.fade.in {
top: 50%;
}
.modal-body {
padding: 0.667em;
overflow-y: scroll;
2020-02-22 04:44:34 +08:00
> * {
// adding box-sizing: border-box; to .modal-body causes iOS dropdown issues
box-sizing: border-box;
}
}
2013-09-06 03:37:07 +08:00
}
2014-06-19 02:04:10 +08:00
.close {
font-size: var(--font-up-4);
2014-06-19 02:04:10 +08:00
}
2013-09-06 03:37:07 +08:00
@media only screen and (max-device-width: 568px) {
.flag-modal-body .flag-message {
2018-02-24 10:41:40 +08:00
height: 3em;
}
}
/* fix for tall modals */
.fixed-modal {
.modal-middle-container {
margin-bottom: 0;
}
.modal-inner-container {
max-height: 90vh;
overflow: auto;
}
&.insert-hyperlink-modal .modal-inner-container {
overflow: visible;
}
html.keyboard-visible:not(.ios-device) & {
height: calc(100% - env(keyboard-inset-height));
.modal-inner-container {
margin: auto;
}
}
}