2019-05-16 01:26:25 +08:00
|
|
|
// Modal wrappers
|
|
|
|
|
2023-11-15 18:14:47 +08:00
|
|
|
.d-modal {
|
|
|
|
pointer-events: none; // Allow clicks through wrappers so they hit the adjacent backdrop element
|
|
|
|
|
2023-11-15 19:33:23 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
z-index: z("modal", "content");
|
|
|
|
overflow: auto;
|
2023-11-15 18:14:47 +08:00
|
|
|
|
2023-11-15 19:33:23 +08:00
|
|
|
&.-inline {
|
|
|
|
position: relative;
|
|
|
|
}
|
2023-11-15 18:14:47 +08:00
|
|
|
|
2023-11-15 19:33:23 +08:00
|
|
|
html.keyboard-visible body.ios-safari-composer-hacks & {
|
|
|
|
height: calc(var(--composer-vh, 1vh) * 100);
|
2023-11-15 18:14:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&__container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
pointer-events: auto;
|
|
|
|
box-sizing: border-box;
|
|
|
|
margin: 0 auto;
|
|
|
|
max-height: 80vh;
|
|
|
|
background-color: var(--secondary);
|
|
|
|
box-shadow: var(--shadow-modal);
|
|
|
|
}
|
|
|
|
|
|
|
|
&__header {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0.5rem 0.5rem 0.5rem 1.5rem; //offset for close button padding
|
|
|
|
border-bottom: 1px solid var(--primary-low);
|
|
|
|
|
2024-02-21 20:49:42 +08:00
|
|
|
.modal-close {
|
|
|
|
margin-left: auto;
|
|
|
|
.d-icon {
|
|
|
|
font-size: var(--font-up-2);
|
|
|
|
color: var(--primary-high);
|
|
|
|
}
|
2023-11-15 18:14:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-22 23:29:32 +08:00
|
|
|
.d-modal__primary-action,
|
|
|
|
.d-modal__dismiss-action {
|
|
|
|
.btn {
|
|
|
|
text-transform: capitalize;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-15 18:14:47 +08:00
|
|
|
&__title-text,
|
|
|
|
&__subtitle-text {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__body {
|
|
|
|
overflow-y: auto;
|
|
|
|
padding: 1rem 1.5rem;
|
2023-12-04 15:10:17 +08:00
|
|
|
box-sizing: border-box;
|
2023-11-15 18:14:47 +08:00
|
|
|
|
|
|
|
input {
|
|
|
|
width: auto;
|
|
|
|
|
|
|
|
&[type="text"] {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
textarea {
|
|
|
|
width: 100%;
|
|
|
|
height: 80px;
|
|
|
|
}
|
|
|
|
pre code {
|
|
|
|
white-space: pre-wrap;
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&__footer {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-items: center;
|
|
|
|
padding: 1rem 1.5rem;
|
|
|
|
border-top: 1px solid var(--primary-low);
|
|
|
|
gap: 0.5rem;
|
|
|
|
}
|
|
|
|
&__backdrop {
|
|
|
|
user-select: none;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: z("modal", "overlay");
|
|
|
|
background-color: #000;
|
|
|
|
animation: fade 0.3s forwards;
|
|
|
|
|
|
|
|
@media (prefers-reduced-motion) {
|
|
|
|
animation-duration: 0s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//legacy
|
|
|
|
|
2016-12-23 01:34:20 +08:00
|
|
|
.input-hint-text {
|
|
|
|
margin-left: 0.5em;
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--secondary-high);
|
2016-12-23 01:34:20 +08:00
|
|
|
}
|
|
|
|
|
2014-04-21 03:17:11 +08:00
|
|
|
.modal-backdrop {
|
UX: Only close modal for full 'click' events outside (#23566)
Previously we were using 'mouseup', which meant that if you started the click inside, and then dragged to outside the modal, it would still close. This kind of dragging action is common when selecting text, and having it close the modal can be very frustrating.
Simply switching to a 'click' listener doesn't totally solve the problem, because when a click event involves dragging from one element to another, the browser will fire the event on "the most specific ancestor element that contained both elements". For modals, the most specific common ancestor was still the `modal-middle-container`, which would cause the modal to close.
Therefore, this commit sets the modal containers to have `pointer-events: none`, and sets up the click listener on the `.modal-backdrop` element, which is **adjacent** to the modal in the DOM. That means that click events fired on any ancestors of the modal will not accidentally trigger closure.
2023-09-25 21:23:59 +08:00
|
|
|
user-select: none;
|
2014-04-21 03:17:11 +08:00
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
2018-06-08 17:49:31 +08:00
|
|
|
z-index: z("modal", "overlay");
|
2014-08-06 21:31:13 +08:00
|
|
|
background-color: #111;
|
2014-04-21 03:17:11 +08:00
|
|
|
&.fade {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.modal-backdrop,
|
|
|
|
.modal-backdrop.fade.in {
|
2018-06-08 17:49:31 +08:00
|
|
|
animation: fade 0.3s;
|
2023-09-15 05:31:43 +08:00
|
|
|
@media (prefers-reduced-motion) {
|
|
|
|
animation-duration: 0s;
|
|
|
|
}
|
2018-06-08 17:49:31 +08:00
|
|
|
opacity: 0.9;
|
2015-01-12 23:29:38 +08:00
|
|
|
filter: alpha(opacity=90);
|
2014-04-21 03:17:11 +08:00
|
|
|
}
|
|
|
|
|
2015-03-26 02:14:34 +08:00
|
|
|
// fade in
|
2014-12-25 17:14:20 +08:00
|
|
|
@keyframes fade {
|
2018-06-08 17:49:31 +08:00
|
|
|
from {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
to {
|
2024-03-22 23:29:32 +08:00
|
|
|
opacity: 0.6;
|
2018-06-08 17:49:31 +08:00
|
|
|
}
|
2014-04-21 03:17:11 +08:00
|
|
|
}
|
2014-12-25 18:29:39 +08:00
|
|
|
|
2014-04-21 03:17:11 +08:00
|
|
|
.modal-form {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2019-02-16 01:01:10 +08:00
|
|
|
|
2014-04-21 03:17:11 +08:00
|
|
|
.modal {
|
2015-07-03 04:18:59 +08:00
|
|
|
.nav {
|
2014-07-12 04:28:44 +08:00
|
|
|
padding: 10px 30px 10px 15px;
|
2020-08-04 10:57:10 +08:00
|
|
|
background-color: var(--secondary);
|
2014-04-21 03:17:11 +08:00
|
|
|
li > a {
|
2022-10-12 21:31:59 +08:00
|
|
|
font-size: var(--font-0);
|
2014-04-21 03:17:11 +08:00
|
|
|
}
|
2020-08-04 10:57:10 +08:00
|
|
|
border-bottom: 1px solid var(--primary-low);
|
2014-04-21 03:17:11 +08:00
|
|
|
}
|
|
|
|
|
2017-07-28 05:14:41 +08:00
|
|
|
&.hidden {
|
2014-04-21 03:17:11 +08:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2018-06-01 06:11:24 +08:00
|
|
|
pre code {
|
|
|
|
white-space: pre-wrap;
|
2021-11-10 03:56:05 +08:00
|
|
|
max-width: var(--modal-max-width);
|
2018-06-01 06:11:24 +08:00
|
|
|
}
|
2014-04-21 03:17:11 +08:00
|
|
|
}
|
|
|
|
|
2022-09-14 00:30:52 +08:00
|
|
|
.reply-where-modal {
|
2023-02-07 02:51:14 +08:00
|
|
|
.dialog-content {
|
|
|
|
width: 100%;
|
|
|
|
min-width: unset;
|
|
|
|
max-width: 30em;
|
|
|
|
}
|
|
|
|
|
2022-09-27 03:05:00 +08:00
|
|
|
.dialog-footer {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2021-02-05 11:37:02 +08:00
|
|
|
.btn {
|
|
|
|
display: block;
|
|
|
|
text-align: left;
|
|
|
|
margin-bottom: 0.75em;
|
2022-08-20 17:19:38 +08:00
|
|
|
margin-right: 0;
|
2021-02-05 11:37:02 +08:00
|
|
|
overflow: hidden;
|
|
|
|
width: 100%;
|
2022-08-20 17:19:38 +08:00
|
|
|
|
2023-02-07 02:51:14 +08:00
|
|
|
&.dialog-close {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-reply-on-original {
|
|
|
|
--text-color: var(--secondary);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-reply-where__cancel {
|
|
|
|
padding-left: 0;
|
|
|
|
margin: 0;
|
2017-09-26 21:23:50 +08:00
|
|
|
}
|
2022-08-20 17:19:38 +08:00
|
|
|
|
2022-08-17 09:39:28 +08:00
|
|
|
&.btn-reply-here {
|
2023-02-07 02:51:14 +08:00
|
|
|
--text-color: var(--primary);
|
|
|
|
.discourse-no-touch & {
|
|
|
|
&:hover {
|
|
|
|
--text-color: var(--secondary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-reply-where {
|
|
|
|
min-height: 3em; // for situations when there are no categories/tags
|
2022-08-17 09:39:28 +08:00
|
|
|
}
|
2022-08-20 17:19:38 +08:00
|
|
|
|
2023-02-07 02:51:14 +08:00
|
|
|
.fancy-title {
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
@include ellipsis;
|
|
|
|
}
|
|
|
|
|
|
|
|
.topic-title__top-line {
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
|
|
|
color: var(--text-color);
|
|
|
|
font-size: var(--font-up-1);
|
2023-05-23 09:52:15 +08:00
|
|
|
.d-icon {
|
|
|
|
color: var(--text-color);
|
|
|
|
margin: 0;
|
|
|
|
}
|
2023-02-07 02:51:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.topic-statuses {
|
|
|
|
display: flex;
|
|
|
|
font-size: 0.95em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.topic-title__bottom-line {
|
|
|
|
margin-top: 0.15em;
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
2023-11-16 00:48:44 +08:00
|
|
|
gap: 0.5em;
|
2023-02-07 02:51:14 +08:00
|
|
|
.discourse-tags {
|
|
|
|
font-size: var(--font-down-1);
|
|
|
|
}
|
2023-11-16 00:48:44 +08:00
|
|
|
.badge-category__name,
|
2023-02-07 02:51:14 +08:00
|
|
|
.discourse-tag {
|
|
|
|
color: var(--text-color);
|
|
|
|
}
|
2014-04-21 03:17:11 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-02-16 01:01:10 +08:00
|
|
|
|
2021-01-20 13:04:21 +08:00
|
|
|
.admin-delete-user-posts-progress-modal {
|
2018-12-14 18:04:18 +08:00
|
|
|
.progress-bar {
|
|
|
|
height: 15px;
|
|
|
|
position: relative;
|
2020-08-04 10:57:10 +08:00
|
|
|
background: var(--primary-low-mid);
|
2018-12-14 18:04:18 +08:00
|
|
|
border-radius: 25px;
|
|
|
|
overflow: hidden;
|
|
|
|
margin: 30px 0 20px;
|
|
|
|
span {
|
|
|
|
display: block;
|
|
|
|
width: 0%;
|
|
|
|
height: 100%;
|
2020-08-04 10:57:10 +08:00
|
|
|
background-color: var(--tertiary);
|
2018-12-14 18:04:18 +08:00
|
|
|
position: relative;
|
|
|
|
transition: width 0.6s linear;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-09 06:15:42 +08:00
|
|
|
.incoming-email-modal {
|
2023-05-13 01:53:54 +08:00
|
|
|
max-height: 80vh;
|
|
|
|
|
2017-03-09 06:15:42 +08:00
|
|
|
.btn {
|
|
|
|
background-color: transparent;
|
|
|
|
margin-right: 5px;
|
2018-06-08 17:49:31 +08:00
|
|
|
&:hover,
|
|
|
|
&.active {
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--primary);
|
2017-03-09 06:15:42 +08:00
|
|
|
}
|
|
|
|
&.active {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
&:focus {
|
2020-08-04 10:57:10 +08:00
|
|
|
outline: 2px solid var(--primary-low);
|
2017-03-09 06:15:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.incoming-email-tabs {
|
|
|
|
margin-bottom: 15px;
|
|
|
|
}
|
|
|
|
.incoming-email-content {
|
|
|
|
height: 300px;
|
2021-11-10 03:56:05 +08:00
|
|
|
max-width: 100%;
|
2018-05-31 03:28:29 +08:00
|
|
|
width: 90vw; // forcing textarea wider
|
2018-06-08 17:49:31 +08:00
|
|
|
textarea,
|
|
|
|
.incoming-email-html-part {
|
2017-03-09 06:15:42 +08:00
|
|
|
height: 95%;
|
|
|
|
border: none;
|
2020-08-04 10:57:10 +08:00
|
|
|
border-top: 1px solid var(--primary-low);
|
2017-03-09 06:15:42 +08:00
|
|
|
padding-top: 10px;
|
2021-11-10 03:56:05 +08:00
|
|
|
width: 100%;
|
2017-03-09 06:15:42 +08:00
|
|
|
}
|
|
|
|
textarea {
|
2023-12-07 22:51:14 +08:00
|
|
|
font-family: var(--d-font-family--monospace);
|
2017-03-09 06:15:42 +08:00
|
|
|
resize: none;
|
2018-01-25 22:53:36 +08:00
|
|
|
border-radius: 0;
|
2017-03-09 06:15:42 +08:00
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
.incoming-email-html-part {
|
2020-02-28 01:47:15 +08:00
|
|
|
width: calc(100% - 36px);
|
2017-03-09 06:15:42 +08:00
|
|
|
padding: 10px 4px 4px 4px;
|
|
|
|
}
|
2020-02-28 01:47:15 +08:00
|
|
|
@media screen and (max-width: 760px) {
|
|
|
|
.incoming-email-html-part {
|
|
|
|
width: calc(100% - 10px);
|
|
|
|
}
|
|
|
|
}
|
2017-03-09 06:15:42 +08:00
|
|
|
}
|
|
|
|
}
|
2017-04-06 04:14:22 +08:00
|
|
|
|
2019-08-13 21:49:40 +08:00
|
|
|
.change-timestamp {
|
2021-11-10 03:56:05 +08:00
|
|
|
width: 28em; // scales with user font-size
|
|
|
|
max-width: 90vw; // prevents overflow due to extra large user font-size
|
2019-08-13 21:49:40 +08:00
|
|
|
}
|
2018-03-29 02:40:26 +08:00
|
|
|
|
2021-04-23 02:36:32 +08:00
|
|
|
.change-timestamp {
|
2018-06-08 17:49:31 +08:00
|
|
|
#date-container {
|
|
|
|
.pika-single {
|
|
|
|
position: relative !important; // overriding another important
|
|
|
|
display: inline-block;
|
2019-06-13 19:30:33 +08:00
|
|
|
margin-top: 0.5em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.date-picker-wrapper {
|
|
|
|
min-width: 130px;
|
|
|
|
margin-right: 0.5em;
|
2018-06-08 17:49:31 +08:00
|
|
|
}
|
2018-03-29 02:40:26 +08:00
|
|
|
|
2018-06-08 17:49:31 +08:00
|
|
|
input[type="time"] {
|
2019-06-13 19:30:33 +08:00
|
|
|
width: 130px;
|
2018-06-08 17:49:31 +08:00
|
|
|
}
|
2018-03-29 02:40:26 +08:00
|
|
|
|
2018-06-08 17:49:31 +08:00
|
|
|
form {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2018-02-24 10:41:40 +08:00
|
|
|
}
|
|
|
|
|
2020-03-12 20:17:52 +08:00
|
|
|
.flag-modal-body {
|
2024-02-08 09:53:45 +08:00
|
|
|
form {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
.flag-action-type .controls .checkbox-label {
|
|
|
|
margin-bottom: 0.25em;
|
|
|
|
}
|
2018-02-24 10:41:40 +08:00
|
|
|
.flag-action-type-details {
|
2018-10-03 00:04:37 +08:00
|
|
|
width: 100%;
|
2023-11-15 18:14:47 +08:00
|
|
|
// max-width: 500px;
|
2022-10-12 22:05:42 +08:00
|
|
|
line-height: var(--line-height-large);
|
2018-02-24 10:41:40 +08:00
|
|
|
}
|
2024-02-21 10:49:19 +08:00
|
|
|
.flag-confirmation {
|
|
|
|
margin-top: 0.5em;
|
|
|
|
padding-left: 1.125em;
|
|
|
|
}
|
2018-02-24 10:41:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.flag-message {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.custom-message-length {
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--primary-medium);
|
2022-10-12 21:31:59 +08:00
|
|
|
font-size: var(--font-down-1);
|
2018-02-24 10:41:40 +08:00
|
|
|
}
|
|
|
|
|
2020-06-19 01:26:25 +08:00
|
|
|
.ignore-duration-with-username-modal {
|
|
|
|
.future-date-input {
|
|
|
|
margin-top: 1em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-20 22:42:44 +08:00
|
|
|
.modal:not(.has-tabs) {
|
|
|
|
.modal-tab {
|
|
|
|
position: absolute;
|
|
|
|
width: 95%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.modal {
|
|
|
|
&.has-tabs {
|
|
|
|
.modal-tabs {
|
|
|
|
display: inline-flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
flex: 1 0 auto;
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
.modal-tab {
|
|
|
|
list-style: none;
|
2020-04-25 07:32:02 +08:00
|
|
|
padding: 4px 8px;
|
|
|
|
margin-right: 4px;
|
2019-02-20 22:42:44 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&.is-active {
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--secondary);
|
|
|
|
background: var(--danger);
|
2019-02-20 22:42:44 +08:00
|
|
|
|
|
|
|
&.single-tab {
|
2019-02-26 21:15:25 +08:00
|
|
|
background: none;
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--primary);
|
2021-07-21 01:58:38 +08:00
|
|
|
padding: 0;
|
|
|
|
font-size: var(--font-up-3);
|
|
|
|
font-weight: bold;
|
2019-02-20 22:42:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-24 10:41:40 +08:00
|
|
|
}
|
2020-07-21 12:04:07 +08:00
|
|
|
|
2021-02-05 03:35:47 +08:00
|
|
|
.bulk-notification-list {
|
|
|
|
margin-bottom: 1.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.notification-level-radio {
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-items: baseline;
|
|
|
|
margin-bottom: 0.5em;
|
|
|
|
.description {
|
|
|
|
width: 100%;
|
|
|
|
margin-top: 0.25em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-07 21:22:01 +08:00
|
|
|
.json-editor-btn-delete {
|
|
|
|
@extend .btn-danger;
|
|
|
|
@extend .no-text;
|
|
|
|
}
|
|
|
|
|
|
|
|
.json-editor-btn-collapse {
|
|
|
|
@extend .no-text;
|
|
|
|
@extend .btn-flat;
|
|
|
|
@extend .btn-small;
|
|
|
|
}
|
2023-10-14 00:24:06 +08:00
|
|
|
|
|
|
|
.confirm-session {
|
|
|
|
&__instructions {
|
2024-02-17 01:18:07 +08:00
|
|
|
margin-bottom: 0.5em;
|
2023-10-14 00:24:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
form {
|
|
|
|
margin: 1.5em 0;
|
|
|
|
}
|
|
|
|
|
2024-02-17 01:18:07 +08:00
|
|
|
&__passkey {
|
|
|
|
margin-top: 1em;
|
2023-11-15 00:38:10 +08:00
|
|
|
}
|
|
|
|
|
2023-10-14 00:24:06 +08:00
|
|
|
&__fine-print {
|
|
|
|
font-size: var(--font-down-1);
|
|
|
|
color: var(--primary-medium);
|
2024-02-17 01:18:07 +08:00
|
|
|
max-width: 600px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__reset {
|
|
|
|
font-size: var(--font-down-1);
|
|
|
|
color: var(--primary-medium);
|
2023-10-14 00:24:06 +08:00
|
|
|
}
|
|
|
|
}
|
2023-10-18 23:46:51 +08:00
|
|
|
|
|
|
|
.rename-passkey__message {
|
|
|
|
max-width: 500px;
|
|
|
|
margin-bottom: 2em;
|
|
|
|
}
|