cryptpad/customize.dist/src/less2/include/alertify.less

514 lines
15 KiB
Plaintext
Raw Normal View History

@import (reference) "./colortheme-all.less";
@import (reference) "./browser.less";
@import (reference) "./variables.less";
@import (reference) "./avatar.less";
@import (reference) "./tools.less";
2017-08-04 10:31:47 +00:00
2018-07-14 13:15:23 +00:00
.alertify_main() {
--LessLoader_require: LessLoader_currentFile();
};
& {
2017-09-13 10:32:30 +00:00
@max-z-index: 2147483647;
2017-08-07 14:27:29 +00:00
@alertify-fore: @colortheme_modal-fg;
@alertify-base: @colortheme_modal-bg;
2017-08-04 10:31:47 +00:00
2017-08-07 14:27:29 +00:00
@alertify-dialog-bg: @alertify-base;
@alertify-dialog-fg: @alertify-fore;
2017-08-04 10:31:47 +00:00
@alertify-btn-fg: @alertify-fore;
2017-08-04 10:31:47 +00:00
2019-11-21 12:29:23 +00:00
@alertify-light-bg: fade(@alertify-fore, 25%);
2017-08-07 14:27:29 +00:00
@alertify-bg: @colortheme_modal-dim;
@alertify-fg: @alertify-fore;
2017-08-04 10:31:47 +00:00
2017-08-07 14:27:29 +00:00
@alertify-input-bg: @colortheme_modal-input;
@alertify-input-fg: @colortheme_modal-input-fg;
2017-08-04 10:31:47 +00:00
2019-11-22 16:03:17 +00:00
@alertify_padding-base: @variables_padding;
@alertify_box-shadow: @variables_shadow;
2017-08-04 10:31:47 +00:00
// Logs to show that something has happened
// These show only once
2019-09-26 10:53:02 +00:00
2017-08-04 10:31:47 +00:00
.alertify-logs {
2019-09-20 13:27:20 +00:00
z-index: 100001; // alertify logs should be in front of alertify modals
2017-08-04 10:31:47 +00:00
@media print {
visibility: hidden;
}
> * {
padding: @alertify_padding-base @alertify_padding-base * 4;
2018-04-16 14:07:40 +00:00
color: @colortheme_notification-color;
2017-08-04 10:31:47 +00:00
font-family: @colortheme_font;
2017-08-04 10:31:47 +00:00
font-size: large;
box-shadow: @alertify_box-shadow;
&, &.default {
// FIXME
2017-08-08 08:37:37 +00:00
background: @colortheme_notification-log;
2017-08-04 10:31:47 +00:00
}
&.error {
font-weight: bold;
2017-08-08 08:37:37 +00:00
background: @colortheme_notification-warn;
2017-08-04 10:31:47 +00:00
}
&.success {
2017-08-08 08:37:37 +00:00
background: @colortheme_notification-log;
2017-08-04 10:31:47 +00:00
}
}
}
.alertify {
position: fixed;
background-color: @alertify-bg;
color: @alertify-fg;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
z-index: 100000; // alertify container
2018-04-19 09:14:22 +00:00
font: @colortheme_app-font;
2017-09-13 10:32:30 +00:00
&.forefront {
z-index: @max-z-index; // alertify max forefront
}
2017-08-04 10:31:47 +00:00
2017-09-07 16:54:58 +00:00
.message {
h1, h2, h3, h4, h5, h6 {
color: @alertify-fg;
}
}
2017-08-04 14:02:35 +00:00
h1, h2, h3 {
margin-top: 0;
}
2017-08-04 10:31:47 +00:00
&.hide {
opacity: 0;
pointer-events: none;
}
&, &.show {
box-sizing: border-box;
transition: all .33s cubic-bezier(.25, .8, .25, 1);
}
&, * {
box-sizing: border-box;
}
.dialog {
padding: 12px;
2017-09-07 10:45:07 +00:00
/*
div.tokenfield {
.token {
//border: 1px solid red;
//color: red;
}
color: @colortheme_light-base;
background-color: @alertify-dialog-bg;
input[id$="tokenfield"][type="text"].token-input {
background-color: @alertify-dialog-bg !important;
}
}*/
2017-08-04 10:31:47 +00:00
}
2019-10-21 13:22:59 +00:00
.dialog {
2017-08-04 10:31:47 +00:00
& > div {
background-color: @alertify-dialog-bg;
&.half {
width: 50%;
max-width: 50%;
2017-08-04 10:31:47 +00:00
@media (max-width: @browser_media-medium-screen) {
width: 100%;
}
}
display: flex;
flex-flow: column;
2017-08-04 10:31:47 +00:00
}
width: 100%;
margin: 0 auto;
position: relative;
top: 50%;
transform: translateY(-50%);
max-height: 100%;
display: flex;
2017-08-04 10:31:47 +00:00
> * {
2017-08-11 13:16:51 +00:00
width: 100%;
2018-02-09 14:45:47 +00:00
min-width: 260px;
2017-08-11 13:16:51 +00:00
max-width: 500px;
2017-08-04 10:31:47 +00:00
margin: 0 auto;
2017-08-04 14:02:35 +00:00
text-align: left;
2017-08-04 10:31:47 +00:00
padding: @alertify_padding-base;
background: #fff;
2017-08-09 09:48:04 +00:00
box-shadow: @alertify_box-shadow;
&.wide {
width: 1000px;
max-width: 70%;
}
2017-08-04 10:31:47 +00:00
}
.msg {
padding: @alertify_padding-base;
margin-bottom: @alertify_padding-base;
margin: 0;
overflow: auto;
2018-01-17 17:39:45 +00:00
}
.alertify-tabs {
max-height: 100%;
display: flex;
flex-flow: column;
.alertify-tabs-titles {
2019-11-21 12:29:23 +00:00
height: 40px;
2018-01-17 17:39:45 +00:00
display: flex;
border-bottom: 1px solid @alertify-fore;
2019-11-21 12:29:23 +00:00
margin-bottom: 10px;
2018-01-17 17:39:45 +00:00
box-sizing: content-box;
span {
font-size: 20px;
2019-11-21 12:29:23 +00:00
height: 40px;
line-height: 40px;
2018-01-17 17:39:45 +00:00
box-sizing: border-box;
padding: 0 15px;
border-left: 1px solid lighten(@alertify-base, 10%);
border-right: 1px solid lighten(@alertify-base, 10%);
cursor: pointer;
2019-11-21 12:29:23 +00:00
&:hover {
background-color: @alertify-light-bg;
}
2018-01-17 17:39:45 +00:00
}
span.alertify-tabs-active {
background-color: @alertify-fore;
border-left: 1px solid @alertify-fore;
border-right: 1px solid @alertify-fore;
color: @alertify-base;
cursor: default;
}
2018-01-17 17:39:45 +00:00
}
.alertify-tabs-contents {
2018-02-09 14:45:47 +00:00
flex: 1 1 auto;
2018-01-17 17:39:45 +00:00
min-height: 0;
& > div {
max-height: 100%;
display: none;
overflow: auto;
}
& > div.alertify-tabs-content-active {
display: block;
&.cp-share-columns {
display: flex;
}
}
}
2017-08-04 10:31:47 +00:00
}
2019-10-21 13:22:59 +00:00
::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
color: @cryptpad_color_grey;
2019-10-21 13:22:59 +00:00
opacity: 1; /* Firefox */
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: @cryptpad_color_grey;
2019-10-21 13:22:59 +00:00
}
::-ms-input-placeholder { /* Microsoft Edge */
color: @cryptpad_color_grey;
2019-10-21 13:22:59 +00:00
}
2017-08-07 09:26:40 +00:00
input:not(.form-control), textarea {
2019-11-21 15:09:38 +00:00
background-color: @alertify-input-fg;
2019-11-22 09:52:21 +00:00
color: @cryptpad_text_col;
2019-11-21 15:09:38 +00:00
border: 1px solid @alertify-input-bg;
2017-08-04 10:31:47 +00:00
margin-bottom: 15px;
width: 100%;
font-size: 100%;
padding: @alertify_padding-base;
2019-11-22 16:03:17 +00:00
&[readonly] {
background-color: @alertify-light-bg;
color: @cryptpad_text_col;
border-color: @alertify-input-fg;
}
2017-08-04 10:31:47 +00:00
}
2017-08-07 09:26:40 +00:00
2018-05-31 11:26:06 +00:00
span.cp-password-container {
display: flex;
align-items: center;
2018-05-31 11:26:06 +00:00
margin-bottom: 15px;
justify-content: space-between;
& > * {
margin-bottom: 0 !important;
}
button {
margin: 0 !important;
}
2018-05-31 11:26:06 +00:00
}
2019-11-21 15:09:38 +00:00
2018-01-17 17:39:45 +00:00
input[type="checkbox"], input[type="radio"] {
width: auto;
2017-08-07 09:26:40 +00:00
padding: 0;
margin-right: 0.5em;
2018-01-17 17:39:45 +00:00
margin-top: 1px;
margin-bottom: 5px;
vertical-align: middle;
& + label {
margin-bottom: 0;
margin-right: 2em;
}
2017-08-07 09:26:40 +00:00
}
button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button) {
background-color: @colortheme_alertify-cancel;
box-sizing: border-box;
position: relative;
outline: 0;
display: inline-block;
align-items: center;
padding: 0 6px;
2019-11-21 15:16:25 +00:00
margin: 6px 8px;
line-height: 36px;
min-height: 36px;
white-space: nowrap;
min-width: 88px;
text-align: center;
text-transform: uppercase;
font-size: 14px;
text-decoration: none;
cursor: pointer;
border-radius: 0;
color: @alertify-btn-fg;
2019-11-25 09:48:08 +00:00
border: 1px solid @alertify-btn-fg;
&.no-margin {
margin: 0;
}
2019-11-25 09:48:08 +00:00
&:hover, &:active {
background-color: @alertify-light-bg;
}
&.safe, &.danger {
color: @colortheme_old-base;
white-space: normal;
font-weight: bold;
}
&.danger {
background-color: @colortheme_alertify-red;
border-color: @colortheme_alertify-red-border;
color: @colortheme_alertify-red-color;
&:hover, &:active {
background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-red, 10%), lighten(@colortheme_alertify-red, 10%));
2017-08-04 10:31:47 +00:00
}
}
2017-08-04 10:31:47 +00:00
&.safe {
background-color: @colortheme_alertify-green;
border-color: @colortheme_alertify-green-border;
color: @colortheme_alertify-green-color;
&:hover, &:active {
background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-green, 10%), lighten(@colortheme_alertify-green, 10%));
}
}
&.primary {
background-color: @colortheme_alertify-primary;
color: @colortheme_alertify-primary-text;
border-color: @colortheme_alertify-primary-border;
font-weight: bold;
2017-08-04 10:31:47 +00:00
&:hover, &:active {
background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-primary, 10%), lighten(@colortheme_alertify-primary, 10%));
2017-08-04 10:31:47 +00:00
}
}
2017-08-04 10:31:47 +00:00
2019-11-25 09:49:14 +00:00
&.cancel {
2019-11-25 09:48:08 +00:00
border-color: @colortheme_alertify-cancel-border;
color: @colortheme_alertify-cancel-border;
2019-11-25 09:49:14 +00:00
&:hover, &:hover {
2019-11-25 09:48:08 +00:00
background-color: fade(@colortheme_alertify-cancel-border, 25%);
}
2017-08-04 10:31:47 +00:00
}
2019-11-25 09:48:08 +00:00
&:focus {
//border: 1px dotted @alertify-base;
box-shadow: 0px 0px 5px @colortheme_alertify-primary;
outline: none;
}
&::-moz-focus-inner {
border: 0;
2017-08-04 10:31:47 +00:00
}
2019-09-12 16:51:03 +00:00
&:disabled {
cursor: not-allowed !important;
background-color: @colortheme_alertify-disabled;
color: @colortheme_alertify-disabled-text;
border-color: @colortheme_alertify-disabled-border;
&:hover, &:active {
background-color: @colortheme_alertify-disabled;
}
}
2017-08-04 10:31:47 +00:00
}
nav {
2019-11-21 15:09:38 +00:00
padding: @alertify_padding-base;
text-align: right;
2019-11-22 16:03:17 +00:00
button {
margin: 0px !important;
2019-11-21 15:09:38 +00:00
&:not(:last-child) {
2019-11-21 15:16:25 +00:00
margin-right: @alertify_padding-base !important;
2019-11-21 15:09:38 +00:00
}
}
}
2017-08-04 10:31:47 +00:00
}
}
.alertify-logs {
position: fixed;
2019-09-20 13:27:20 +00:00
z-index: 100001; // alertify logs (just in front of alertify modals
2017-08-04 10:31:47 +00:00
&.bottom, &:not(.top) {
bottom: 16px;
/* // Bottom left placement. Default. Use for transitions.
2017-08-04 10:31:47 +00:00
&.left, &:not(.right) {
> * {
}
}
// Top right placement
&.right {
> * {
}
}*/
2017-08-04 10:31:47 +00:00
}
// All left positions.
&.left, &:not(.right) {
left: 16px;
> * {
float: left;
transform: translate3d(0, 0, 0);
height: auto;
&.show {
left: 0;
}
&, &.hide {
left: -110%;
}
}
}
&.right {
right: 16px;
> * {
float: right;
transform: translate3d(0, 0, 0);
&.show {
right: 0;
opacity: 1;
}
&, &.hide {
right: -110%;
opacity: 0;
}
}
}
&.top {
top: 0;
/* // Top left placement, use for transitions.
2017-08-04 10:31:47 +00:00
&.left, &:not(.right) {
> * {
}
}
// Top right placement, use for transitions
&.right {
> * {
}
}*/
2017-08-04 10:31:47 +00:00
}
> * {
box-sizing: border-box;
transition: all .4s cubic-bezier(.25, .8, .25, 1);
position: relative;
clear: both;
backface-visibility: hidden;
perspective: 1000;
& {
max-height: 0;
margin: 0;
padding: 0;
overflow: hidden;
opacity: 0;
pointer-events: none;
}
&.show {
margin-top: @alertify_padding-base;
opacity: 1;
max-height: 1000px;
padding: @alertify_padding-base;
pointer-events: auto;
}
}
}
div.wide {
2019-09-18 14:15:45 +00:00
div.alertify-tabs {
p.msg:not(:last-child) {
border-bottom: 1px solid @alertify-fore;
}
}
.cp-share-columns {
display: flex;
flex-flow: row;
2019-08-30 15:36:27 +00:00
& > .cp-share-column {
width: 50%;
padding: 0 10px;
2019-09-12 16:51:03 +00:00
position: relative;
&.contains-nav {
nav {
position: relative;
bottom: 0;
right: 0;
button {
margin: 0 !important;
&:not(:first-child) {
margin-left: 8px !important;
margin-top: 6px !important;
}
}
}
2019-09-12 16:51:03 +00:00
}
2019-09-18 14:15:45 +00:00
&:first-child {
border-right: 1px solid @alertify-fore;
}
}
}
2019-09-20 13:27:20 +00:00
.cp-ownership {
& > label {
font-weight: bold;
}
}
}
.cp-share-column {
2019-09-26 10:53:02 +00:00
.cp-usergrid-grid {
2019-09-09 09:02:08 +00:00
max-height: 225px;
overflow-x: auto;
}
}
2018-07-18 12:31:01 +00:00
}