Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
style(next): restyle modals
Adorian Doranfbba1021cc8b
diff --git a/src/public/stylesheets/theme-next-dark.css b/src/public/stylesheets/theme-next-dark.cssindex 0d7fa12ac3..7787848610 100644--- a/src/public/stylesheets/theme-next-dark.css+++ b/src/public/stylesheets/theme-next-dark.css@@ -90,8 +90,18 @@--menu-item-delimiter-color: #ffffff1c;--menu-item-group-header-color: #ffffff91;- --modal-background-color: #333;- --modal-backdrop-color: #444;+ --modal-backdrop-color: #000;+ --modal-shadow-color: rgba(0, 0, 0, .5);+ --modal-border-color: #444;+ --modal-background-color: #262626;+ --modal-title-color: gray;+ --modal-control-button-background: #ffffff2b;+ --modal-control-button-color: #cbcbcb;+ --modal-control-button-hover-color: white;+ --modal-control-button-hover-background: var(--hover-item-background-color);+ --modal-close-button-hover-background: var(--tab-close-button-hover-background);+ --modal-footer-background: #ffffff08;+ --modal-footer-color: #ffffff7a;--quick-search-background: #ffffff12;--quick-search-color: #ffffff52;@@ -210,7 +220,3 @@ body .CodeMirror {body .todo-list input[type="checkbox"]:not(:checked):before {border-color: var(--muted-text-color) !important;}--.btn-close {- filter: invert(1);-}diff --git a/src/public/stylesheets/theme-next-light.css b/src/public/stylesheets/theme-next-light.cssindex c0d4195014..93c8344515 100644--- a/src/public/stylesheets/theme-next-light.css+++ b/src/public/stylesheets/theme-next-light.css@@ -84,8 +84,18 @@--menu-item-delimiter-color: #00000030;--menu-item-group-header-color: #00000061;+ --modal-backdrop-color: #7c7c7c;+ --modal-shadow-color: #00000033;+ --modal-border-color: #797979;--modal-background-color: white;- --modal-backdrop-color: black;+ --modal-title-color: gray;+ --modal-control-button-background: #0000001a;+ --modal-control-button-color: #737373;+ --modal-control-button-hover-color: white;+ --modal-control-button-hover-background: gray;+ --modal-close-button-hover-background: var(--tab-close-button-hover-background);+ --modal-footer-background: #00000008;+ --modal-footer-color: #00000085;--quick-search-background: #00000012;--quick-search-color: #06060682;diff --git a/src/public/stylesheets/theme-next/base.css b/src/public/stylesheets/theme-next/base.cssindex 9a5e8d13a0..65b2a0ff4e 100644--- a/src/public/stylesheets/theme-next/base.css+++ b/src/public/stylesheets/theme-next/base.css@@ -63,6 +63,8 @@--icon-button-size: 32px;--icon-button-icon-ratio: 0.65;+ --modal-control-button-size: 22px;+/* Theme capabilities */--tab-note-icons: true;}diff --git a/src/public/stylesheets/theme-next/shell.css b/src/public/stylesheets/theme-next/shell.cssindex 5466072209..e465ea59a0 100644--- a/src/public/stylesheets/theme-next/shell.css+++ b/src/public/stylesheets/theme-next/shell.css@@ -2020,4 +2020,93 @@ div.promoted-attribute-cell .multiplicity:has(span) {margin-left: 8px;margin-right: calc(var(--pa-card-padding-left) - var(--pa-card-padding-right));font-size: 0; /* Prevent whitespaces creating a gap between buttons */+}++/*+ * Modals+ */++/* Modal body */+.modal .modal-content {+ box-shadow: 0 .5em 3em .5em var(--modal-shadow-color);+ border: 1px solid var(--modal-border-color);+}++/* Modal header */+.modal .modal-header {+ border-bottom: unset;+ user-select: none;+}++.modal .modal-header .modal-title {+ flex-grow: 1;+ font-size: 1.2em;+ color: var(--modal-title-color);+}++/* Modal control buttons (close and help) */++.modal .modal-header .btn-close,+.modal .modal-header .help-button {+ display: flex;+ justify-content: center;+ align-items: center;+ margin-left: 8px;+ border: 0;+ border-radius: 50%;+ padding: 0;+ width: var(--modal-control-button-size);+ height: var(--modal-control-button-size);+ background: var(--modal-control-button-background);+ font-size: var(--modal-control-button-size);+ line-height: normal;+ font-weight: normal;+ color: var(--modal-control-button-color);+ opacity: 1;+ cursor: default;+}++.modal .modal-header .btn-close {+ --modal-control-button-hover-background: var(--modal-close-button-hover-background);+}++.modal .modal-header .btn-close::after {+ content: "\ec8d";+ font-family: boxicons;+}++.modal .modal-header .help-button {+ margin-right: 0;+ font-size: calc(var(--modal-control-button-size) * .75);+ font-family: unset;+ font-weight: bold;+}++.modal .modal-header .btn-close:hover,+.modal .modal-header .help-button:hover {+ background: var(--modal-control-button-hover-background);+ color: var(--modal-control-button-hover-color);+}++.modal .modal-header .btn-close:active,+.modal .modal-header .help-button:active {+ transform: scale(.85);+}++.modal .modal-header .btn-close:focus,+.modal .modal-header .help-button:focus {+ box-shadow: none !important;+}++.modal .modal-header .btn-close:focus-visible,+.modal .modal-header .help-button:focus-visible {+ outline: 2px solid var(--input-focus-outline-color);+ outline-offset: 2px;+}++/* Modal footer */+.modal .modal-footer {+ background: var(--modal-footer-background);+ color: var(--modal-footer-color);+ border-top: unset;}\ No newline at end of file