From a6d3dbf94fb58f05ec303c4a9cae3b69bf4c3581 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Thu, 12 Jul 2018 19:13:04 +0200 Subject: [PATCH] Wrapped modal.less into a mixin which gets rid of the last file which emitted CSS --- .../src/less2/include/fileupload.less | 3 +- .../src/less2/include/framework.less | 4 +- customize.dist/src/less2/include/modal.less | 104 +++++++++--------- customize.dist/src/less2/include/toolbar.less | 3 +- www/code/app-code.less | 2 +- www/common/file-dialog.less | 3 +- www/contacts/app-contacts.less | 2 +- www/debug/app-debug.less | 2 +- www/drive/app-drive.less | 2 +- www/file/app-file.less | 2 +- www/filepicker/app-filepicker.less | 5 +- www/kanban/app-kanban.less | 2 +- www/pad/app-pad.less | 2 +- www/poll/app-poll.less | 2 +- www/profile/app-profile.less | 3 +- www/settings/app-settings.less | 2 +- www/slide/app-slide.less | 2 +- www/todo/app-todo.less | 2 +- www/whiteboard/app-whiteboard.less | 2 +- www/worker/app-worker.less | 2 +- 20 files changed, 78 insertions(+), 73 deletions(-) diff --git a/customize.dist/src/less2/include/fileupload.less b/customize.dist/src/less2/include/fileupload.less index 5fc357357..bc4787869 100644 --- a/customize.dist/src/less2/include/fileupload.less +++ b/customize.dist/src/less2/include/fileupload.less @@ -1,8 +1,9 @@ @import (reference) './colortheme-all.less'; -@import (once) './modal.less'; +@import (reference) './modal.less'; .fileupload_main () { /* Upload status table */ + modal_main(); #cp-fileupload { .modal_base(); position: absolute; diff --git a/customize.dist/src/less2/include/framework.less b/customize.dist/src/less2/include/framework.less index 930a710d1..af2ccf3b8 100644 --- a/customize.dist/src/less2/include/framework.less +++ b/customize.dist/src/less2/include/framework.less @@ -1,6 +1,6 @@ @import (reference) "./colortheme-all.less"; -@import (once) "./toolbar.less"; -@import (once) './fileupload.less'; +@import (reference) "./toolbar.less"; +@import (reference) './fileupload.less'; @import (reference) './alertify.less'; @import (reference) './tokenfield.less'; @import (reference) './creation.less'; diff --git a/customize.dist/src/less2/include/modal.less b/customize.dist/src/less2/include/modal.less index 76e006bf9..154c8d1ad 100644 --- a/customize.dist/src/less2/include/modal.less +++ b/customize.dist/src/less2/include/modal.less @@ -17,62 +17,64 @@ } } -.cp-modal-container { - display: none; - - z-index: 100000; //Z modal container - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - background-color: @colortheme_modal-dim; - - .cp-modal { - background-color: @colortheme_modal-bg; - color: @colortheme_modal-fg; - box-shadow: @variables_shadow; - - padding: @variables_padding; +.modal_main() { + .cp-modal-container { + display: none; + z-index: 100000; //Z modal container position: absolute; - top: 15vh; bottom: 15vh; - left: 10vw; right: 10vw; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: @colortheme_modal-dim; - overflow: auto; + .cp-modal { + background-color: @colortheme_modal-bg; + color: @colortheme_modal-fg; + box-shadow: @variables_shadow; - font-family: @colortheme_font; - text-align: center; - - & > p { - margin-bottom: 1em; - } - - .cp-modal-form { - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: center; - } - - input { - background-color: @colortheme_modal-input; - color: @colortheme_modal-input-fg; - border: 0; - padding: 8px 12px; - margin: 1em; - width: 300px; - } - - .cp-modal-close { - text-shadow: none; - color: inherit; + padding: @variables_padding; position: absolute; - top: 0; - right: 0; - margin: @variables_padding; - cursor: pointer; + top: 15vh; bottom: 15vh; + left: 10vw; right: 10vw; + + overflow: auto; + + font-family: @colortheme_font; + text-align: center; + + & > p { + margin-bottom: 1em; + } + + .cp-modal-form { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + } + + input { + background-color: @colortheme_modal-input; + color: @colortheme_modal-input-fg; + border: 0; + padding: 8px 12px; + margin: 1em; + width: 300px; + } + + .cp-modal-close { + text-shadow: none; + color: inherit; + + position: absolute; + top: 0; + right: 0; + margin: @variables_padding; + cursor: pointer; + } } } -} +} \ No newline at end of file diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index 8d3b017e4..3587b6eaf 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -7,7 +7,7 @@ @import (reference) "./icon-colors.less"; @import (reference) "./tools.less"; @import (reference) "./icons.less"; -@import (once) "./modal.less"; +@import (reference) "./modal.less"; @import (reference) "./markdown-toolbar.less"; @import (reference) "./help.less"; @@ -32,6 +32,7 @@ .iconColors_main(); .markdownToolbar_main(@color, @bg-color); .help_main(@color, @bg-color); + .modal_main(); .cp-toolbar-container { display: flex; diff --git a/www/code/app-code.less b/www/code/app-code.less index 7572cd030..a8c78fc02 100644 --- a/www/code/app-code.less +++ b/www/code/app-code.less @@ -1,6 +1,6 @@ @import (reference) "../../customize/src/less2/include/browser.less"; @import (reference) "../../customize/src/less2/include/markdown.less"; -@import (once) "../../customize/src/less2/include/framework.less"; +@import (reference) "../../customize/src/less2/include/framework.less"; .framework_main( diff --git a/www/common/file-dialog.less b/www/common/file-dialog.less index be0efab90..8f47f6024 100644 --- a/www/common/file-dialog.less +++ b/www/common/file-dialog.less @@ -1,7 +1,8 @@ @import (reference) '../customize/src/less2/include/colortheme-all.less'; -@import (once) '../customize/src/less2/include/modal.less'; +@import (reference) '../customize/src/less2/include/modal.less'; .fileDialog_main () { + .modal_main(); #fileDialog { display: none; .cp-modal { diff --git a/www/contacts/app-contacts.less b/www/contacts/app-contacts.less index 82254b9a9..3dd868eea 100644 --- a/www/contacts/app-contacts.less +++ b/www/contacts/app-contacts.less @@ -1,7 +1,7 @@ @import (reference) "../../customize/src/less2/include/browser.less"; @import (reference) "../../customize/src/less2/include/markdown.less"; @import (reference) '../../customize/src/less2/include/avatar.less'; -@import (once) '../../customize/src/less2/include/framework.less'; +@import (reference) '../../customize/src/less2/include/framework.less'; .framework_min_main( @bg-color: @colortheme_friends-bg, diff --git a/www/debug/app-debug.less b/www/debug/app-debug.less index f34dc6264..35ea42f2a 100644 --- a/www/debug/app-debug.less +++ b/www/debug/app-debug.less @@ -2,7 +2,7 @@ @import (reference) "../../customize/src/less2/include/markdown.less"; @import (reference) '../../customize/src/less2/include/tools.less'; @import (reference) '../../customize/src/less2/include/tokenfield.less'; -@import (once) '../../customize/src/less2/include/framework.less'; +@import (reference) '../../customize/src/less2/include/framework.less'; .tokenfield_main(); .framework_min_main(); diff --git a/www/drive/app-drive.less b/www/drive/app-drive.less index 44ac90014..4137d0dbe 100644 --- a/www/drive/app-drive.less +++ b/www/drive/app-drive.less @@ -4,7 +4,7 @@ @import (reference) "../../customize/src/less2/include/tools.less"; @import (reference) "../../customize/src/less2/include/limit-bar.less"; @import (reference) "../../customize/src/less2/include/tokenfield.less"; -@import (once) '../../customize/src/less2/include/framework.less'; +@import (reference) '../../customize/src/less2/include/framework.less'; .framework_min_main( @bg-color: @colortheme_drive-bg, diff --git a/www/file/app-file.less b/www/file/app-file.less index 963a3e247..41853e847 100644 --- a/www/file/app-file.less +++ b/www/file/app-file.less @@ -1,7 +1,7 @@ @import (reference) "../../customize/src/less2/include/browser.less"; @import (reference) "../../customize/src/less2/include/markdown.less"; @import (reference) '../../customize/src/less2/include/tokenfield.less'; -@import (once) '../../customize/src/less2/include/framework.less'; +@import (reference) '../../customize/src/less2/include/framework.less'; .framework_min_main( @bg-color: @colortheme_file-bg, diff --git a/www/filepicker/app-filepicker.less b/www/filepicker/app-filepicker.less index 9dbb508df..712700451 100644 --- a/www/filepicker/app-filepicker.less +++ b/www/filepicker/app-filepicker.less @@ -1,7 +1,7 @@ @import (reference) '../../customize/src/less2/include/colortheme-all.less'; -@import (once) '../../customize/src/less2/include/modal.less'; +@import (reference) '../../customize/src/less2/include/modal.less'; @import (reference) '../../customize/src/less2/include/icon-colors.less'; -@import (once) '../../customize/src/less2/include/fileupload.less'; +@import (reference) '../../customize/src/less2/include/fileupload.less'; @import (reference) '../../customize/src/less2/include/alertify.less'; @import (reference) '../../customize/src/less2/include/tippy.less'; @import (reference) '../../customize/src/less2/include/checkmark.less'; @@ -13,6 +13,7 @@ .tippy_main(); .checkmark_main(20px); .password_main(); +.modal_main(); #cp-filepicker-dialog { display: none; diff --git a/www/kanban/app-kanban.less b/www/kanban/app-kanban.less index 24962d232..417f4fd14 100644 --- a/www/kanban/app-kanban.less +++ b/www/kanban/app-kanban.less @@ -1,5 +1,5 @@ @import (reference) "../../customize/src/less2/include/browser.less"; -@import (once) "../../customize/src/less2/include/framework.less"; +@import (reference) "../../customize/src/less2/include/framework.less"; @import (reference) "../../customize/src/less2/include/tools.less"; .framework_main( @bg-color: @colortheme_kanban-bg, diff --git a/www/pad/app-pad.less b/www/pad/app-pad.less index fa7d1142a..74862650c 100644 --- a/www/pad/app-pad.less +++ b/www/pad/app-pad.less @@ -1,4 +1,4 @@ -@import (once) "../../customize/src/less2/include/framework.less"; +@import (reference) "../../customize/src/less2/include/framework.less"; .framework_main( @bg-color: @colortheme_pad-bg, diff --git a/www/poll/app-poll.less b/www/poll/app-poll.less index 31f48523b..7ccf11901 100644 --- a/www/poll/app-poll.less +++ b/www/poll/app-poll.less @@ -2,7 +2,7 @@ @import (reference) "../../customize/src/less2/include/markdown.less"; @import (reference) '../../customize/src/less2/include/tools.less'; @import (reference) '../../customize/src/less2/include/avatar.less'; -@import (once) "../../customize/src/less2/include/framework.less"; +@import (reference) "../../customize/src/less2/include/framework.less"; .framework_main( diff --git a/www/profile/app-profile.less b/www/profile/app-profile.less index a4eb4735d..45684abd9 100644 --- a/www/profile/app-profile.less +++ b/www/profile/app-profile.less @@ -1,7 +1,6 @@ @import (reference) "../../customize/src/less2/include/browser.less"; @import (reference) "../../customize/src/less2/include/markdown.less"; -@import (once) '../../customize/src/less2/include/framework.less'; - +@import (reference) '../../customize/src/less2/include/framework.less'; @import (reference) '../../customize/src/less2/include/avatar.less'; @import (reference) '../../customize/src/less2/include/sidebar-layout.less'; diff --git a/www/settings/app-settings.less b/www/settings/app-settings.less index a494a1b80..fce502376 100644 --- a/www/settings/app-settings.less +++ b/www/settings/app-settings.less @@ -3,7 +3,7 @@ @import (reference) '../../customize/src/less2/include/sidebar-layout.less'; @import (reference) "../../customize/src/less2/include/limit-bar.less"; @import (reference) "../../customize/src/less2/include/creation.less"; -@import (once) '../../customize/src/less2/include/framework.less'; +@import (reference) '../../customize/src/less2/include/framework.less'; .framework_min_main( @bg-color: @colortheme_settings-bg, diff --git a/www/slide/app-slide.less b/www/slide/app-slide.less index bfb470845..1126e32a4 100644 --- a/www/slide/app-slide.less +++ b/www/slide/app-slide.less @@ -1,7 +1,7 @@ @import (reference) "../../customize/src/less2/include/browser.less"; @import (reference) "../../customize/src/less2/include/markdown.less"; @import (reference) "../../customize/src/less2/include/mediatag.less"; -@import (once) "../../customize/src/less2/include/framework.less"; +@import (reference) "../../customize/src/less2/include/framework.less"; .mediatag_base(); .framework_main( diff --git a/www/todo/app-todo.less b/www/todo/app-todo.less index 582ea6d44..12d44e950 100644 --- a/www/todo/app-todo.less +++ b/www/todo/app-todo.less @@ -1,7 +1,7 @@ @import (reference) "../../customize/src/less2/include/browser.less"; @import (reference) "../../customize/src/less2/include/markdown.less"; @import (reference) '../../customize/src/less2/include/avatar.less'; -@import (once) '../../customize/src/less2/include/framework.less'; +@import (reference) '../../customize/src/less2/include/framework.less'; .framework_min_main( @bg-color: @colortheme_todo-bg, diff --git a/www/whiteboard/app-whiteboard.less b/www/whiteboard/app-whiteboard.less index 3b1022655..03b5d7ea2 100644 --- a/www/whiteboard/app-whiteboard.less +++ b/www/whiteboard/app-whiteboard.less @@ -1,7 +1,7 @@ @import (reference) "../../customize/src/less2/include/browser.less"; @import (reference) "../../customize/src/less2/include/markdown.less"; @import (reference) '../../customize/src/less2/include/tools.less'; -@import (once) "../../customize/src/less2/include/framework.less"; +@import (reference) "../../customize/src/less2/include/framework.less"; .framework_main( @bg-color: @colortheme_whiteboard-bg, diff --git a/www/worker/app-worker.less b/www/worker/app-worker.less index 2efdc8a2f..769e1235a 100644 --- a/www/worker/app-worker.less +++ b/www/worker/app-worker.less @@ -1,7 +1,7 @@ @import (reference) "../../customize/src/less2/include/browser.less"; @import (reference) "../../customize/src/less2/include/markdown.less"; @import (reference) '../../customize/src/less2/include/avatar.less'; -@import (once) '../../customize/src/less2/include/framework.less'; +@import (reference) '../../customize/src/less2/include/framework.less'; .framework_min_main();