Drop bootstrap modal.less by using <dialog> <header> and <footer>

https://snappymail.eu/demo/ updated for testing
This commit is contained in:
djmaze 2021-11-07 17:06:08 +01:00
parent 880d4a05e9
commit 6170de5aee
70 changed files with 1521 additions and 1709 deletions

View file

@ -14,7 +14,6 @@
@import "../../vendors/bootstrap/less/buttons.less";
@import "../../vendors/bootstrap/less/button-groups.less";
@import "../../vendors/bootstrap/less/alerts.less";
@import "../../vendors/bootstrap/less/modals.less";
@import "../../vendors/bootstrap/less/utilities.less";
@import "../../vendors/bootstrap/less/wells.less";

View file

@ -14,7 +14,6 @@
@import "../../vendors/bootstrap/less/buttons.less";
@import "../../vendors/bootstrap/less/button-groups.less";
@import "../../vendors/bootstrap/less/alerts.less";
@import "../../vendors/bootstrap/less/modals.less";
@import "../../vendors/bootstrap/less/utilities.less";
@import "../../vendors/bootstrap/less/navs.less";

View file

@ -1,18 +1,14 @@
.b-domain-alias-content {
&.modal {
max-width: 330px;
}
#V-PopupsDomainAlias {
max-width: 330px;
.error-desc {
color: red;
}
}
.b-domain-content {
#V-PopupsDomain {
&.modal {
max-width: 810px;
}
max-width: 810px;
.domain-desc {
color: #666;

View file

@ -91,17 +91,6 @@
padding-right: 12px;
}
#rl-popups > .rl-view-model {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1100;
overflow: auto;
background-color: rgba(0,0,0,0.3);
}
#rl-settings-subscreen {
padding: 20px;
}

View file

@ -1,8 +1,6 @@
.b-plugin-content {
#V-PopupsPlugin {
&.modal {
max-width: 660px;
}
max-width: 660px;
.modal-body {
overflow: auto;

View file

@ -18,22 +18,22 @@
@media screen and (min-width: 1000px) {
html.rl-started-trigger .b-login-content {
html.rl-started-trigger .LoginView {
/*transform: scale(1.1);*/
transform: translateY(-20px);
opacity: 0.5;
}
.b-login-content .errorAnimated {
.LoginView .errorAnimated {
animation: login-form-shake 400ms ease-in-out;
}
.b-login-content .errorAnimated .buttonLogin {
.LoginView .errorAnimated .buttonLogin {
color: #b94a48;
font-weight: bold;
}
.b-login-content {
.LoginView {
transition: all 0.3s ease-out;
}
@ -41,23 +41,4 @@
transition: all 0.2s linear;
}
#rl-popups > .rl-view-model .modal {
transition: all .2s ease-out;
}
#rl-popups > .rl-view-model:not(.show) .modal {
top: -25%;
}
#rl-popups > .rl-view-model .modal.fade {
opacity: 1;
}
#rl-popups > .rl-view-model:not(.show) .modal.fade {
opacity: 0;
}
}
#rl-popups > .rl-view-model {
transition: background-color 0.2s linear;
}
#rl-popups > .rl-view-model:not(.show) {
background-color: rgba(0,0,0,0);
}

View file

@ -1,4 +1,4 @@
.b-ask-content {
#V-PopupsAsk {
.modal-body {
font-size: 18px;

View file

@ -1,8 +1,6 @@
.b-languages-content {
#V-PopupsLanguages {
&.modal {
max-width: 700px;
}
max-width: 710px;
label {
display: inline-block;
@ -37,7 +35,7 @@
}
@media screen and (max-width: 999px) {
.b-languages-content label {
#V-PopupsLanguages label {
width: calc(100% - 40px);
}
}

View file

@ -1,4 +1,4 @@
.RL-Login, .RL-AdminLogin {
#V-Login, #V-AdminLogin {
position: fixed;
left: 50%;
top: 50%;
@ -13,7 +13,7 @@
@glass-error-color: #f76260;
@glass-m-color: rgba(255, 255, 255, .8);
.b-login-content {
.LoginView {
position: relative;
@ -163,7 +163,7 @@
}
@media screen and (max-width: 480px) {
.b-login-content {
.LoginView {
form {
padding: 30px 4vw 10px;
}

View file

@ -124,3 +124,96 @@ textarea + .settings-save-trigger {
.tabs [id^="tab"]:checked + label + .tab-content {
visibility: visible;
}
.dialog-backdrop {
background: rgba(0,0,0,0.5);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
/*
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.5);
z-index: 1000000000;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1100;
overflow: auto;
background-color: rgba(0,0,0,0.3);
*/
}
dialog {
border: 0;
background-color: @white;
border: 1px solid rgba(0,0,0,.3);
border-radius: 6px;
box-shadow: 0 5px 80px rgba(0,0,0,0.3);
margin: 10px auto;
max-height: calc(100vh - 20px);
max-width: 560px;
overflow: auto;
padding: 0;
transition: all .2s ease-out;
top: 0;
width: calc(100% - 20px);
}
dialog:not([open]) {
display: none !important;
}
dialog.show {
opacity: 1;
}
dialog:not(.show) {
background-color: rgba(0,0,0,0);
opacity: 0;
top: -25%;
}
dialog header {
padding: 9px 15px;
border-bottom: 1px solid #eee;
// Close icon
.close { margin-top: 2px; }
// Heading
h3 {
margin: 0;
line-height: 30px;
}
}
// Body (where all modal content resides)
dialog .modal-body {
overflow-y: auto;
padding: 15px;
}
// Footer (for actions)
dialog footer {
padding: 14px 15px 15px;
margin-bottom: 0;
text-align: right; // right align buttons
border-top: 1px solid #ddd;
border-radius: 0 0 6px 6px;
.clearfix(); // clear it in case folks use .pull-* classes on buttons
// Properly space out buttons
.btn + .btn {
margin-left: 5px;
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
}
// but override that for button groups
.btn-group .btn + .btn {
margin-left: -1px;
}
}

View file

@ -1,7 +1,7 @@
.b-advanced-search-content {
&.modal {
max-width: 780px;
}
#V-PopupsAdvancedSearch {
max-width: 780px;
.control-label {
width: 110px;
}

View file

@ -34,7 +34,7 @@
}
}
.b-compose.loading .b-header-toolbar {
#V-PopupsCompose header.loading {
background-size: 60px 60px;
background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%,

View file

@ -1,13 +1,10 @@
.b-compose {
&.modal {
display: flex;
flex-direction: column;
height: calc(100% - 52px);
max-width: 1000px;
width: 98%;
}
#V-PopupsCompose {
display: flex;
flex-direction: column;
height: calc(100% - 52px);
max-width: 1000px;
width: 98%;
.modal-body {
padding: 0;
@ -32,22 +29,23 @@
border-top: 1px solid #ccc;
overflow-y: auto;
padding: 10px;
.no-attachments-desc {
padding-top: 50px;
text-align: center;
font-size: 24px;
color: #666;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.attachmentList {
margin: 0;
padding: 10px;
}
}
.b-header-toolbar {
.attachmentName {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.no-attachments-desc {
padding-top: 50px;
text-align: center;
font-size: 24px;
color: #666;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
header {
background-color: rgba(0,0,0,0.8);
@ -160,7 +158,7 @@
}
@media screen and (max-width: 999px) {
.b-compose.modal {
#V-PopupsCompose {
border: 0;
width: 100%;
}

View file

@ -1,7 +1,14 @@
@contacts-popup-left-width: 25%;
.RL-PopupsContacts {
#V-PopupsContacts {
bottom: 0;
width: auto;
min-width: 550px;
max-width: 900px;
min-height: 300px;
max-height: 700px;
.control-group {
.control-label {
@ -10,15 +17,6 @@
}
}
.modal {
bottom: 0;
width: auto;
min-width: 550px;
max-width: 900px;
min-height: 300px;
max-height: 700px;
}
.modal-body {
height: calc(100% - 49px);
padding: 0;

View file

@ -1,4 +1,4 @@
.b-filter-content {
#V-PopupsFilter {
max-width: 750px;

View file

@ -1,8 +1,6 @@
.b-identity-content {
#V-PopupsIdentity {
&.modal {
max-width: 770px;
}
max-width: 770px;
.modal-body {
overflow: hidden;

View file

@ -75,7 +75,7 @@ html:not(.rl-left-panel-disabled) #rl-left {
}
#rl-left > .resizer,
.rl-side-preview-pane .RL-MailMessageList > .resizer {
.rl-side-preview-pane #V-MailMessageList > .resizer {
cursor: ew-resize;
height: 100%;
right: 0;
@ -83,17 +83,17 @@ html:not(.rl-left-panel-disabled) #rl-left {
width: 5px;
}
.rl-side-preview-pane .RL-MailMessageList {
.rl-side-preview-pane #V-MailMessageList {
resize: horizontal;
min-width: 320px;
max-width: 60%;
}
.rl-bottom-preview-pane .RL-MailMessageList {
.rl-bottom-preview-pane #V-MailMessageList {
resize: vertical;
min-height: 200px;
max-height: 60%;
}
.rl-bottom-preview-pane .RL-MailMessageList > .resizer {
.rl-bottom-preview-pane #V-MailMessageList > .resizer {
cursor: ns-resize;
height: 5px;
left: 0;
@ -102,11 +102,11 @@ html:not(.rl-left-panel-disabled) #rl-left {
}
html:not(.rl-left-panel-disabled) #rl-left > .resizer,
.RL-MailMessageList > .resizer {
#V-MailMessageList > .resizer {
display: block;
}
.RL-MailMessageList {
#V-MailMessageList {
position: absolute;
top: 0;
bottom: @rlBottomMargin;
@ -114,7 +114,7 @@ html:not(.rl-left-panel-disabled) #rl-left > .resizer,
width: 50%;
}
.RL-MailMessageView {
#V-MailMessageView {
position: absolute;
top: 50px + @rlLowMargin;
bottom: 13px;
@ -148,30 +148,11 @@ html:not(.rl-left-panel-disabled) #rl-left > .resizer,
}
html.rl-side-preview-pane {
.RL-MailMessageView {
#V-MailMessageView {
left: 50%;
}
}
/*
#rl-popups > dialog {
top: 0;
margin: 10px auto;
padding: 0;
border: 0;
}
*/
#rl-popups > .rl-view-model {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1100;
overflow: auto;
background-color: rgba(0,0,0,0.3);
}
#rl-settings-subscreen {
padding:20px;
}
@ -256,12 +237,12 @@ html.rl-side-preview-pane {
left: @rlLeftWidth + 20;
}
.RL-MailMessageList {
#V-MailMessageList {
width: 40%;
}
html.rl-side-preview-pane {
.RL-MailMessageView {
#V-MailMessageView {
left: 40%;
}
}
@ -317,7 +298,7 @@ html.rl-left-panel-disabled {
html.rl-no-preview-pane {
.RL-MailMessageList {
#V-MailMessageList {
right: @rlBottomMargin !important;
width: inherit;
}
@ -331,14 +312,14 @@ html.rl-no-preview-pane #rl-right .resizer {
html.rl-bottom-preview-pane {
.RL-MailMessageList {
#V-MailMessageList {
bottom: inherit;
width: inherit;
height: 300px;
right: 0;
}
.RL-MailMessageView {
#V-MailMessageView {
left: 0;
top: 356px;
}

View file

@ -1,12 +1,12 @@
html.rl-mobile,
html.rl-no-preview-pane {
.message-selected .RL-MailMessageList {
.message-selected #V-MailMessageList {
display: none;
}
}
.RL-MailMessageList.focused .messageList {
#V-MailMessageList.focused .messageList {
border-color: #9d9d9d;
}
@ -15,7 +15,7 @@ html.rl-no-preview-pane {
padding-right: 6px;
}
.RL-MailMessageList .btn-toolbar {
#V-MailMessageList .btn-toolbar {
height: 30px;
padding: 10px 1px;
white-space: nowrap;
@ -42,15 +42,13 @@ html.rl-no-preview-pane {
border-top: 1px solid #bbb;
.e-quota {
border-bottom: 1px dashed #333;
display: inline-block;
margin-top: 5px;
margin-left: 5px;
font-size: 18px;
cursor: help;
}
.e-quota:hover {
border-bottom: 1px dashed #333;
}
}
.btn.buttonMoreSearch {

View file

@ -1,11 +1,11 @@
html.rl-no-preview-pane {
#rl-right:not(.message-selected) .RL-MailMessageView {
#rl-right:not(.message-selected) #V-MailMessageView {
display: none;
}
}
.RL-MailMessageView.focused .messageView {
#V-MailMessageView.focused .messageView {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
border-color: darken(@rlMainDarkColor, 5%);
}
@ -501,10 +501,10 @@ html.rl-message-fullscreen {
}
#rl-right {
.RL-MailMessageList,
.RL-SettingsPane,
.RL-SystemDropDown,
.RL-MailMessageView .messageView .toolbar {
#V-MailMessageList,
#V-SettingsPane,
#V-SystemDropDown,
#V-MailMessageView .messageView .toolbar {
display: none !important;
}
}

View file

@ -1,20 +1,16 @@
.b-open-pgp-key-view-content, .b-open-pgp-key-generate-content {
&.modal {
max-width: 570px;
}
#V-PopupsViewOpenPgpKey, #V-PopupsNewOpenPgpKey {
max-width: 570px;
}
.b-open-pgp-key-view-content {
#V-PopupsViewOpenPgpKey {
.key-viewer {
max-height: 500px;
overflow: auto;
}
}
.b-compose-open-pgp-content {
&.modal {
max-width: 800px;
}
#V-PopupsComposeOpenPgp {
max-width: 800px;
.key-list {
@ -95,10 +91,8 @@
}
}
.b-message-open-pgp-content {
&.modal {
max-width: 700px;
}
#V-PopupsMessageOpenPgp {
max-width: 700px;
.key-list {
@ -132,10 +126,9 @@
}
}
.b-open-pgp-key-add-content {
&.modal {
max-width: 645px;
}
#V-PopupsAddOpenPgpKey {
max-width: 645px;
.inputKey {
font-family: var(--fontMono);
width: 600px;

View file

@ -1,10 +1,10 @@
.b-filter-script {
#V-PopupsSieveScript {
width: auto;
max-width: 720px;
}
.b-filter-script .filter-item,
#V-PopupsSieveScript .filter-item,
.b-settings-filters .script-item {
white-space: nowrap;
}
@ -30,7 +30,7 @@
color: #aaa;
}
.b-filter-script textarea {
#V-PopupsSieveScript textarea {
height: 300px;
font-family: var(--fontMono);
}

View file

@ -1,7 +1,5 @@
.b-shortcuts-content {
&.modal {
max-width: 700px;
}
#V-PopupsKeyboardShortcutsHelp {
max-width: 700px;
td[class^="icon-"] {
display: table-cell;

View file

@ -175,14 +175,14 @@ Secondly, we can't rely on MUA's what to do with :empty
}
}
.rl-mobile .b-compose.modal,
.rl-mobile .b-identity-content.modal {
.rl-mobile #V-PopupsCompose,
.rl-mobile #V-PopupsIdentity {
margin-bottom: 50px;
}
.rl-mobile .b-compose.modal {
.rl-mobile #V-PopupsCompose {
min-height: calc(100% - 62px);
}
.RL-PopupsCompose[data-wysiwyg*=Forced] #squire-toolgroup-mode {
#V-PopupsCompose[data-wysiwyg*=Forced] #squire-toolgroup-mode {
display: none;
}

View file

@ -10,7 +10,7 @@
top: 40px;
}
.RL-SystemDropDown {
#V-SystemDropDown {
position: absolute;
top: 0;