insomnia/app/ui/css/components/modal.less

133 lines
2.6 KiB
Plaintext
Raw Normal View History

2016-04-07 03:09:14 +00:00
@import '../constants/dimensions';
@import '../constants/colors';
.modal {
// Hidden state
opacity: 0;
z-index: -999999; // Component updates this manually
transition: opacity 300ms;
2016-04-07 03:09:14 +00:00
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
2016-08-29 17:58:59 +00:00
padding: @padding-lg;
&.modal--open {
opacity: 1;
}
&:focus {
outline: 0;
}
2016-06-20 06:05:40 +00:00
2016-07-07 20:10:55 +00:00
&.modal--fixed-height .modal__content {
height: 100%;
}
2016-06-20 06:05:40 +00:00
.modal__backdrop {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
.modal__content {
display: grid;
2016-09-15 22:45:08 +00:00
grid-template-columns: 100%;
2016-09-20 20:53:34 +00:00
grid-template-rows: auto minmax(0, 1fr) auto;
2016-08-29 17:58:59 +00:00
border-radius: @radius-md;
overflow: visible;
2016-06-20 06:05:40 +00:00
box-sizing: border-box;
box-shadow: 0 0 2rem 0 rgba(0, 0, 0, 0.2);
2016-08-29 17:58:59 +00:00
width: @modal-width;
2016-06-20 06:05:40 +00:00
max-width: 100%;
max-height: 100%;
margin: auto;
2017-01-23 22:41:31 +00:00
background-color: var(--color-bg);
color: var(--color-font);
border: 1px solid @hl-sm;
}
&.modal--wide .modal__content {
2016-08-29 17:58:59 +00:00
width: @modal-width-wide;
2016-06-20 06:05:40 +00:00
}
2016-04-07 03:09:14 +00:00
2016-07-20 18:35:08 +00:00
&.modal--fixed-top .modal__content {
margin: 0 auto auto auto;
}
2016-04-07 03:09:14 +00:00
.modal__header {
2016-08-29 17:58:59 +00:00
border-bottom: 1px solid @hl-md;
height: @line-height-md;
font-size: @font-size-lg;
line-height: @line-height-md;
2017-01-23 22:41:31 +00:00
background-color: var(--color-bg);
color: var(--color-font);
display: flex;
flex-direction: row;
.modal__header__children {
padding-left: @padding-md;
width: 100%;
}
2016-05-01 19:56:30 +00:00
.modal__close-btn {
height: 100%;
}
2016-04-07 03:09:14 +00:00
}
&.modal--noescape .modal__close-btn {
display: none;
}
2016-05-01 19:56:30 +00:00
.modal__body {
overflow: auto;
min-height: 2rem;
box-sizing: border-box;
max-width: 100%;
2017-01-23 22:41:31 +00:00
background-color: var(--color-bg);
color: var(--color-font);
&.modal__body--no-scroll {
overflow: visible;
height: 100%;
}
2016-05-01 19:56:30 +00:00
}
2016-04-07 03:09:14 +00:00
.modal__footer {
2016-08-29 17:58:59 +00:00
border-top: 1px solid @hl-md;
2017-01-23 22:41:31 +00:00
background-color: var(--color-bg);
color: var(--color-font);
Sync Proof of Concept (#33) * Maybe working POC * Change to use remote url * Other URL too * Some logic * Got the push part working * Made some updates * Fix * Update * Add status code check * Stuff * Implemented new sync api * A bit more robust * Debounce changes * Change timeout * Some fixes * Remove .less * Better error handling * Fix base url * Support for created vs updated docs * Try silent * Silence removal too * Small fix after merge * Fix test * Stuff * Implement key generation algorithm * Tidy * stuff * A bunch of stuff for the new API * Integrated the session stuff * Stuff * Just started on encryption * Lots of updates to encryption * Finished createResourceGroup function * Full encryption/decryption working (I think) * Encrypt localstorage with sessionID * Some more * Some extra checks * Now uses separate DB. Still needs to be simplified a LOT * Fix deletion bug * Fixed unicode bug with encryption * Simplified and working * A bunch of polish * Some stuff * Removed some workspace meta properties * Migrated a few more meta properties * Small changes * Fix body scrolling and url cursor jumping * Removed duplication of webpack port * Remove workspaces reduces * Some small fixes * Added sync modal and opt-in setting * Good start to sync flow * Refactored modal footer css * Update sync status * Sync logger * A bit better logging * Fixed a bunch of sync-related bugs * Fixed signup form button * Gravatar component * Split sync modal into tabs * Tidying * Some more error handling * start sending 'user agent * Login/signup error handling * Use real UUIDs * Fixed tests * Remove unused function * Some extra checks * Moved cloud sync setting to about page * Some small changes * Some things
2016-10-21 17:20:36 +00:00
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.modal__footer > *:last-child {
// Push last item of footer to right. This is very important to pull right
// if there is only a single item in the footer.
margin-left: auto;
2016-04-07 03:09:14 +00:00
}
2016-07-07 20:10:55 +00:00
.modal__content > *:not(.modal__backdrop):last-child {
2016-08-29 17:58:59 +00:00
border-bottom-left-radius: @radius-md;
border-bottom-right-radius: @radius-md;
2016-07-07 20:10:55 +00:00
}
// 2nd child because the backdrop is the first
.modal__content > *:nth-child(2) {
2016-08-29 17:58:59 +00:00
border-top-left-radius: @radius-md;
border-top-right-radius: @radius-md;
2016-07-07 20:10:55 +00:00
}
2016-04-07 03:09:14 +00:00
}
.modals {
width: 0;
height: 0;
}