2013-09-05 15:37:07 -04:00
|
|
|
// base styles for every modal popup used in Discourse
|
|
|
|
|
2024-03-22 11:29:32 -04:00
|
|
|
// prevents bg scrolling when modal is open
|
|
|
|
html:has(.d-modal) {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
html.keyboard-visible.mobile-view {
|
|
|
|
.d-modal {
|
|
|
|
max-height: calc(var(--composer-vh, var(--1dvh)) * 100);
|
|
|
|
height: calc(var(--composer-vh, var(--1dvh)) * 100);
|
|
|
|
bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-modal__container {
|
|
|
|
max-height: calc(var(--composer-vh, var(--1dvh)) * 100);
|
|
|
|
height: calc(var(--composer-vh, var(--1dvh)) * 100);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
html:not(.keyboard-visible.mobile-view) {
|
|
|
|
.d-modal__container {
|
|
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-15 05:14:47 -05:00
|
|
|
.d-modal {
|
2024-03-22 11:29:32 -04:00
|
|
|
align-items: flex-end;
|
|
|
|
|
2023-11-15 05:14:47 -05:00
|
|
|
&__container {
|
2024-03-22 11:29:32 -04:00
|
|
|
// this is a hack to prevent issues on safari with transforms
|
|
|
|
position: fixed;
|
|
|
|
|
2023-11-15 05:14:47 -05:00
|
|
|
width: 100%;
|
|
|
|
max-width: 100%;
|
2024-03-22 11:29:32 -04:00
|
|
|
max-height: calc(var(--composer-vh, var(--1dvh)) * 85);
|
|
|
|
}
|
|
|
|
|
|
|
|
&__header {
|
|
|
|
padding: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ios-device & {
|
|
|
|
&__footer {
|
|
|
|
margin-top: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__title-text {
|
|
|
|
font-size: var(--font-up-1-rem);
|
2023-11-15 05:14:47 -05:00
|
|
|
}
|
2023-11-20 11:56:06 -05:00
|
|
|
|
|
|
|
// 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%;
|
2024-03-22 11:29:32 -04:00
|
|
|
min-height: 100%;
|
|
|
|
height: 100%;
|
2023-11-20 11:56:06 -05:00
|
|
|
}
|
|
|
|
}
|
2023-11-15 05:14:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//legacy
|
2013-09-05 15:37:07 -04:00
|
|
|
|
2020-02-21 15:44:34 -05:00
|
|
|
.modal {
|
|
|
|
&.fade {
|
|
|
|
transition: opacity 0.3s linear, top 0.3s ease-out;
|
|
|
|
top: -25%;
|
|
|
|
}
|
|
|
|
&.fade.in {
|
|
|
|
top: 50%;
|
|
|
|
}
|
2013-09-05 15:37:07 -04:00
|
|
|
}
|
2014-04-20 15:16:06 -04:00
|
|
|
|
2014-06-18 14:04:10 -04:00
|
|
|
.close {
|
2022-10-12 09:31:59 -04:00
|
|
|
font-size: var(--font-up-4);
|
2014-06-18 14:04:10 -04:00
|
|
|
}
|
2013-09-05 15:37:07 -04:00
|
|
|
|
2017-09-14 15:18:55 -04:00
|
|
|
@media only screen and (max-device-width: 568px) {
|
2024-02-23 09:14:37 -05:00
|
|
|
.flag-modal-body .flag-message {
|
2018-02-23 21:41:40 -05:00
|
|
|
height: 3em;
|
2017-09-14 15:18:55 -04:00
|
|
|
}
|
|
|
|
}
|