discourse/app/assets/stylesheets/common/base/modal.scss

671 lines
11 KiB
SCSS
Raw Normal View History

.modal-open {
.dropdown-menu {
z-index: z("modal", "dropdown");
}
.popover {
z-index: z("modal", "popover");
}
.tooltip {
z-index: z("modal", "tooltip");
}
}
2018-01-26 14:52:03 -05:00
.bootbox.modal {
position: fixed;
z-index: z("modal", "content");
2018-01-26 14:52:03 -05:00
overflow: auto;
height: auto;
background-color: $secondary;
box-shadow: shadow("card");
2018-01-26 14:52:03 -05:00
background-clip: padding-box;
}
.input-hint-text {
margin-left: 0.5em;
2017-10-10 16:07:46 -04:00
color: $secondary-high;
}
.modal-header {
display: flex;
2018-03-28 14:40:26 -04:00
padding: 10px 15px;
2017-10-19 15:51:08 -04:00
border-bottom: 1px solid $primary-low;
align-items: center;
2018-05-30 11:14:00 -04:00
.title {
h3 {
margin-bottom: 0;
}
p {
margin: 0;
}
}
2018-05-30 11:14:00 -04:00
.modal-close {
align-self: flex-start;
2018-03-28 14:40:26 -04:00
order: 2;
margin-left: auto;
}
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: z("modal", "overlay");
2014-08-06 09:31:13 -04:00
background-color: #111;
&.fade {
opacity: 0;
}
}
.modal-backdrop,
.modal-backdrop.fade.in {
animation: fade 0.3s;
opacity: 0.9;
filter: alpha(opacity=90);
}
// fade in
@keyframes fade {
from {
opacity: 0;
}
to {
opacity: 0.9;
}
}
2014-12-25 05:29:39 -05:00
// slide in
@keyframes slidein {
from {
transform: translateY(-20%);
}
to {
transform: translateY(0);
}
}
.modal-outer-container {
display: table;
table-layout: fixed;
width: 100%;
height: 100%;
}
.modal-inner-container {
display: table;
2018-05-30 11:14:00 -04:00
width: 100%;
min-width: 320px;
2018-02-09 15:45:34 -05:00
max-width: 700px;
margin: 0 auto;
background-color: $secondary;
background-clip: padding-box;
box-shadow: shadow("modal");
2018-10-04 15:47:14 -04:00
padding: 1px;
box-sizing: border-box;
2018-05-30 11:14:00 -04:00
@media screen and (min-width: 475px) {
min-width: 475px;
width: auto;
}
2017-10-19 15:51:08 -04:00
.select-kit {
2017-10-19 15:51:08 -04:00
width: 220px;
&.tag-chooser {
width: 100%;
}
2017-10-19 15:51:08 -04:00
}
}
.create-account.in .modal-inner-container,
.login-modal.in .modal-inner-container {
animation: slidein 0.3s;
}
.inline-modal {
.modal-inner-container {
border: 1px solid $secondary-medium;
}
}
.fixed-modal {
position: fixed;
top: 0;
width: 100%;
height: 100%;
z-index: z("modal", "content");
overflow: auto;
&:not(.history-modal) {
.modal-body {
max-height: none !important;
}
}
}
2018-02-23 21:41:40 -05:00
.modal-form {
margin-bottom: 0;
}
.modal-footer {
padding: 14px 15px 10px;
2017-10-19 15:51:08 -04:00
border-top: 1px solid $primary-low;
.btn {
margin: 0 5px 5px 0;
}
}
.modal-footer:before,
.modal-footer:after {
display: table;
content: "";
}
.modal-footer:after {
clear: both;
}
.modal.edit-category-modal {
.modal-body {
textarea {
height: 10em;
}
}
2018-05-30 23:24:43 -04:00
@media screen and (min-width: 524px) {
.modal-inner-container {
min-width: 525px;
2018-05-30 23:24:43 -04:00
}
}
}
.modal {
.nav {
2014-07-11 16:28:44 -04:00
padding: 10px 30px 10px 15px;
2017-06-11 22:20:14 -04:00
background-color: $secondary;
li > a {
2018-01-12 17:27:38 -05:00
font-size: $font-0;
}
2017-10-19 15:51:08 -04:00
border-bottom: 1px solid $primary-low;
}
&.hidden {
display: none;
}
.modal-body {
box-sizing: border-box;
width: 100%;
overflow-y: auto;
2018-02-23 21:41:40 -05:00
max-height: 400px;
&.full-height-modal {
max-height: calc(100vh - 150px);
}
textarea {
width: 99%;
height: 80px;
}
p {
2018-01-12 17:27:38 -05:00
font-size: $font-0;
}
.archetype-option {
margin-bottom: 20px;
}
.warning {
color: $danger !important;
}
.json-uploader {
.jsfu-shade-container {
display: table-row;
width: 100%;
height: 100%;
position: relative;
}
.jsfu-shade {
z-index: z("base");
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
.text {
color: rgb(255, 255, 255);
position: absolute;
top: 40%;
2018-01-12 17:27:38 -05:00
font-size: $font-up-6;
text-align: center;
2018-01-12 17:27:38 -05:00
line-height: $line-height-medium;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
}
}
.jsfu-file {
display: table-cell;
vertical-align: middle;
min-width: 120px;
}
.jsfu-separator {
vertical-align: middle;
display: table-cell;
font-size: 2.571em;
padding-left: 10px;
padding-right: 10px;
}
.jsfu-paste {
display: table-cell;
width: 100%;
textarea {
margin-bottom: 0;
margin-top: 4px;
}
}
}
}
.password-confirmation {
display: none;
}
section.field {
padding: 0.25em 0;
margin-bottom: 5px;
}
2014-12-20 09:07:29 -05:00
section.field .field-item {
display: inline-block;
margin-right: 10px;
}
// password reset modal
.modal-body.forgot-password-modal p {
2018-01-12 17:27:38 -05:00
font-size: $font-0;
}
pre code {
white-space: pre-wrap;
max-width: 700px;
}
}
.reply-where-modal {
.modal-footer {
a {
display: block;
}
.d-modal-cancel {
margin-top: 1em;
}
.btn {
text-align: left;
2018-01-12 17:27:38 -05:00
font-size: $font-up-2;
line-height: $line-height-medium;
width: auto;
margin-bottom: 10px;
display: block;
margin-left: 0 !important; // override needed
font-weight: bold;
.topic-title {
2018-01-12 17:27:38 -05:00
font-size: $font-0;
font-weight: normal;
}
&.btn-reply-here {
background: $primary-low;
text-shadow: none;
color: $primary;
}
}
}
}
.d-modal-cancel {
margin-left: 1em;
color: $primary-medium;
&:hover {
color: $danger;
}
}
.delete-user-modal {
.modal-footer {
.btn {
font-weight: normal;
text-align: left;
2018-01-12 17:27:38 -05:00
font-size: $font-0;
line-height: $line-height-large;
margin-bottom: 10px;
display: inline-block;
margin-left: 0;
}
}
}
.delete-posts-progress {
.progress-bar {
height: 15px;
position: relative;
background: $primary-low-mid;
border-radius: 25px;
overflow: hidden;
margin: 30px 0 20px;
span {
display: block;
width: 0%;
height: 100%;
background-color: $tertiary;
position: relative;
transition: width 0.6s linear;
}
}
}
#invite-modal {
overflow: visible;
label {
margin-top: 7px;
2018-05-30 23:24:43 -04:00
max-width: 450px;
}
2016-06-07 04:04:58 -04:00
.optional {
color: #9e9ea6;
}
}
.permission-list {
list-style: none;
margin: 0 0 30px;
padding: 0;
.name {
margin-right: 20px;
display: inline-block;
min-width: 100px;
}
.permission {
margin-left: 20px;
}
.d-icon-times-circle {
margin-left: 5px;
}
li {
margin-bottom: 10px;
}
}
.edit-category-modal {
input:not([type="checkbox"]),
.controls {
display: block;
margin-bottom: 0.5em;
}
2017-03-10 11:57:18 -05:00
.disable_info_wrap {
position: relative;
display: inline-block;
float: right;
.cannot_delete_reason {
position: absolute;
background: $primary;
color: $secondary;
2017-03-10 11:57:18 -05:00
text-align: center;
border-radius: 2px;
padding: 12px 8px;
&::after {
top: 100%;
left: 57%;
border: solid transparent;
content: " ";
position: absolute;
border-top-color: $primary;
2017-03-10 11:57:18 -05:00
border-width: 8px;
}
}
}
2018-03-28 14:40:26 -04:00
.permission-selector {
margin-right: 0.25em;
}
.add-permission {
position: relative;
top: 0.1em;
}
.add-permission-icon {
margin: 0;
}
.edit-category-tab-settings {
$category-settings-width: 280px; // Consistent width makes this all easier to read
> section {
margin-bottom: 1.5em;
}
input[type="number"],
input[type="text"],
.select-kit {
width: $category-settings-width;
}
label {
max-width: $category-settings-width;
}
2019-04-10 23:49:26 -04:00
.category-email-in-outlet {
label {
flex-wrap: wrap; // Todo: fix all multi-element labels
a {
margin-left: 1.3em;
}
}
}
}
}
.incoming-email-modal {
.btn {
transition: none;
background-color: transparent;
margin-right: 5px;
&:hover,
&.active {
color: $primary;
}
&.active {
font-weight: bold;
}
&:focus {
2017-10-19 15:51:08 -04:00
outline: 2px solid $primary-low;
}
}
.incoming-email-tabs {
margin-bottom: 15px;
}
.incoming-email-content {
height: 300px;
max-width: 700px;
2018-05-30 15:28:29 -04:00
width: 90vw; // forcing textarea wider
textarea,
.incoming-email-html-part {
height: 95%;
border: none;
2017-10-19 15:51:08 -04:00
border-top: 1px solid $primary-low;
padding-top: 10px;
}
textarea {
font-family: monospace;
resize: none;
border-radius: 0;
box-shadow: none;
}
.incoming-email-html-part {
padding: 10px 4px 4px 4px;
}
}
}
.modal-button-bar {
margin-top: 1em;
button {
margin-right: 0.5em;
}
}
.change-timestamp,
.poll-ui-builder {
.date-picker {
min-width: 8em;
}
2018-03-28 14:40:26 -04:00
#date-container {
.pika-single {
position: relative !important; // overriding another important
display: inline-block;
margin-top: 5px;
}
}
2018-03-28 14:40:26 -04:00
input[type="time"] {
2018-09-14 13:38:58 -04:00
width: 7em;
text-align: center;
}
2018-03-28 14:40:26 -04:00
form {
margin: 0;
}
2018-02-23 21:41:40 -05:00
}
.flag-modal {
max-height: 450px;
.flag-action-type-details {
2018-10-02 12:04:37 -04:00
width: 100%;
2018-02-23 21:41:40 -05:00
line-height: $line-height-large;
}
}
.flag-message {
width: 95% !important;
margin: 0;
}
.custom-message-length {
color: dark-light-choose($primary-low-mid, $secondary-high);
font-size: $font-down-1;
}
.edit-category-modal {
.secure-category-options {
margin: 10px 0 0 16px;
.badge-list {
margin: 10px 0;
li {
margin: 0 4px 8px 0;
a {
color: dark-light-choose($primary-medium, $secondary-medium);
cursor: pointer;
}
a:hover {
color: dark-light-choose($primary-medium, $secondary-medium);
}
}
}
}
2018-02-23 21:41:40 -05:00
}
.jump-to-post-modal {
.modal-body {
#post-jump,
.date-picker {
margin: 0;
width: 100px;
}
.pika-single {
position: relative !important;
}
.jump-to-post-control .index {
color: $primary-medium;
}
.separator {
display: flex;
align-items: center;
margin: 1em auto;
.left,
.right {
flex: 1 0 0px;
}
.text {
margin: 0 0.5em;
color: $primary-medium;
}
}
}
}
// move-to topic modal
.move-to-modal {
// move to existing topic
.existing-topic {
.radio {
flex-wrap: wrap;
}
.topic-title {
max-width: 90%;
}
.topic-categories {
width: 100%;
}
}
}
2018-02-23 21:41:40 -05:00
.tabbed-modal {
.modal-body {
position: relative;
height: 350px;
}
}
.modal:not(.has-tabs) {
.modal-tab {
position: absolute;
width: 95%;
}
}
.modal {
&.has-tabs {
.modal-tabs {
display: inline-flex;
flex-wrap: wrap;
width: calc(100% - 20px);
flex: 1 0 auto;
margin: 0;
.modal-tab {
list-style: none;
padding: s(1 2);
margin-right: s(1);
cursor: pointer;
&.is-active {
color: $secondary;
background: $danger;
&.single-tab {
background: none;
color: $primary;
padding: s(1 0);
}
}
}
}
}
2018-02-23 21:41:40 -05:00
}