From dcb4ee739e32b2b9f3b08128106338c56c50f9e5 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Thu, 28 Nov 2024 18:02:56 +0100 Subject: [PATCH 01/19] First tests to create a theme without overwriting colors --- panel/src/components/Collection/Item.vue | 3 +- panel/src/components/Dialogs/Dialog.vue | 2 +- panel/src/components/Drawers/Drawer.vue | 2 +- .../src/components/Drawers/Elements/Body.vue | 2 +- .../components/Dropdowns/DropdownContent.vue | 4 -- panel/src/components/Forms/Blocks/Block.vue | 4 +- .../components/Forms/Blocks/BlockOptions.vue | 2 +- panel/src/components/Forms/Blocks/Blocks.vue | 6 ++- .../Elements/BlockBackgroundDropdown.vue | 2 +- .../Forms/Blocks/Elements/BlockFigure.vue | 2 +- .../components/Forms/Blocks/Types/Code.vue | 4 -- .../components/Forms/Blocks/Types/Gallery.vue | 2 +- .../components/Forms/Blocks/Types/Image.vue | 2 +- .../Forms/Blocks/Types/Markdown.vue | 2 +- panel/src/components/Forms/Input.vue | 4 +- .../components/Forms/Input/ChoiceInput.vue | 2 +- .../components/Forms/Input/TogglesInput.vue | 2 +- panel/src/components/Forms/Layouts/Layout.vue | 2 +- .../Forms/Previews/BubblesFieldPreview.vue | 2 +- .../src/components/Forms/Toolbar/Toolbar.vue | 2 +- panel/src/components/Layout/Box.vue | 2 +- panel/src/components/Layout/Bubble.vue | 2 +- .../components/Layout/Frame/ColorFrame.vue | 4 -- panel/src/components/Layout/Header.vue | 2 +- panel/src/components/Layout/Overlay.vue | 4 -- panel/src/components/Layout/Stat.vue | 8 ++-- panel/src/components/Layout/Table.vue | 12 ++---- panel/src/components/Navigation/Button.vue | 8 +--- .../src/components/Navigation/ButtonGroup.vue | 5 ++- panel/src/components/Text/Code.vue | 5 --- panel/src/components/Text/Text.vue | 2 +- panel/src/components/View/Activation.vue | 3 -- panel/src/components/View/Menu.vue | 9 ++--- panel/src/components/View/Panel.vue | 3 +- .../components/Views/Files/FilePreview.vue | 11 ++--- .../Views/Files/FilePreviewDetails.vue | 5 +-- .../Views/Files/FilePreviewFrame.vue | 3 -- panel/src/components/Views/Files/FileView.vue | 1 + .../components/Views/Users/UserProfile.vue | 2 +- panel/src/styles/config/colors.css | 40 +++++++++---------- panel/src/styles/config/pattern.css | 15 ------- panel/src/styles/reset/choice.css | 4 +- panel/src/styles/utilities/theme.css | 13 ++++-- 43 files changed, 86 insertions(+), 130 deletions(-) diff --git a/panel/src/components/Collection/Item.vue b/panel/src/components/Collection/Item.vue index af6e957c87..4ae3425864 100644 --- a/panel/src/components/Collection/Item.vue +++ b/panel/src/components/Collection/Item.vue @@ -140,13 +140,14 @@ export default { :root { --item-button-height: var(--height-md); --item-button-width: var(--height-md); + --item-color-back: light-dark(var(--color-white), var(--color-gray-950)); --item-height: auto; --item-height-cardlet: calc(var(--height-md) * 3); } .k-item { position: relative; - background: var(--color-white); + background: var(--item-color-back); box-shadow: var(--shadow); border-radius: var(--rounded); min-height: var(--item-height); diff --git a/panel/src/components/Dialogs/Dialog.vue b/panel/src/components/Dialogs/Dialog.vue index ab94a49d4d..4eb339646f 100644 --- a/panel/src/components/Dialogs/Dialog.vue +++ b/panel/src/components/Dialogs/Dialog.vue @@ -50,7 +50,7 @@ export default { diff --git a/panel/src/components/Forms/Blocks/Types/Image.vue b/panel/src/components/Forms/Blocks/Types/Image.vue index a5f419bf85..e152d09443 100644 --- a/panel/src/components/Forms/Blocks/Types/Image.vue +++ b/panel/src/components/Forms/Blocks/Types/Image.vue @@ -40,7 +40,7 @@ export default { extends: Block, data() { return { - back: this.onBack() ?? "var(--color-white)" + back: this.onBack() ?? "transparent" }; }, computed: { diff --git a/panel/src/components/Forms/Blocks/Types/Markdown.vue b/panel/src/components/Forms/Blocks/Types/Markdown.vue index aea08fae58..248e322eec 100644 --- a/panel/src/components/Forms/Blocks/Types/Markdown.vue +++ b/panel/src/components/Forms/Blocks/Types/Markdown.vue @@ -36,7 +36,7 @@ export default { diff --git a/panel/src/components/Layout/Header.vue b/panel/src/components/Layout/Header.vue index 0007354ba0..81c22b032a 100644 --- a/panel/src/components/Layout/Header.vue +++ b/panel/src/components/Layout/Header.vue @@ -60,7 +60,7 @@ export default { diff --git a/panel/src/components/Views/Files/FilePreviewFrame.vue b/panel/src/components/Views/Files/FilePreviewFrame.vue index e081439c98..451d050684 100644 --- a/panel/src/components/Views/Files/FilePreviewFrame.vue +++ b/panel/src/components/Views/Files/FilePreviewFrame.vue @@ -62,7 +62,4 @@ export default { .k-button.k-file-preview-frame-dropdown-toggle { --button-color-icon: var(--color-gray-500); } -.k-panel[data-theme="dark"] .k-button.k-file-preview-frame-dropdown-toggle { - --button-color-icon: var(--color-gray-700); -} diff --git a/panel/src/components/Views/Files/FileView.vue b/panel/src/components/Views/Files/FileView.vue index 2d0eaa404b..6aea0e57d3 100644 --- a/panel/src/components/Views/Files/FileView.vue +++ b/panel/src/components/Views/Files/FileView.vue @@ -87,6 +87,7 @@ export default { diff --git a/panel/src/components/Drawers/Elements/Header.vue b/panel/src/components/Drawers/Elements/Header.vue index 97cdd858d8..8d57627a57 100644 --- a/panel/src/components/Drawers/Elements/Header.vue +++ b/panel/src/components/Drawers/Elements/Header.vue @@ -68,7 +68,7 @@ export default { align-items: center; line-height: 1; justify-content: space-between; - background: var(--color-white); + background: light-dark(var(--color-white), var(--color-gray-850)); font-size: var(--text-sm); } diff --git a/panel/src/components/Forms/Blocks/Block.vue b/panel/src/components/Forms/Blocks/Block.vue index 11daefecf1..f3bdb36b2f 100644 --- a/panel/src/components/Forms/Blocks/Block.vue +++ b/panel/src/components/Forms/Blocks/Block.vue @@ -366,7 +366,7 @@ export default { border-radius: var(--rounded); } .k-block-container:not(:last-of-type) { - border-bottom: 1px dashed var(--color-border-dimmed); + border-bottom: 1px dashed var(--panel-color-back); } .k-block-container:focus { outline: 0; diff --git a/panel/src/components/Forms/Blocks/BlockSelector.vue b/panel/src/components/Forms/Blocks/BlockSelector.vue index b42cc5c0e7..40bc8cd8ce 100644 --- a/panel/src/components/Forms/Blocks/BlockSelector.vue +++ b/panel/src/components/Forms/Blocks/BlockSelector.vue @@ -157,7 +157,7 @@ export default { } .k-block-types .k-button { --button-color-icon: var(--color-text); - --button-color-back: var(--color-white); + --button-color-back: light-dark(var(--color-white), var(--color-gray-850)); --button-padding: var(--spacing-3); width: 100%; justify-content: start; diff --git a/panel/src/components/Forms/Blocks/Elements/BlockFigure.vue b/panel/src/components/Forms/Blocks/Elements/BlockFigure.vue index e35483fcd3..c67b912b7e 100644 --- a/panel/src/components/Forms/Blocks/Elements/BlockFigure.vue +++ b/panel/src/components/Forms/Blocks/Elements/BlockFigure.vue @@ -52,7 +52,7 @@ export default { diff --git a/panel/src/components/Layout/Stat.vue b/panel/src/components/Layout/Stat.vue index df424656a1..cd21873b96 100644 --- a/panel/src/components/Layout/Stat.vue +++ b/panel/src/components/Layout/Stat.vue @@ -83,7 +83,7 @@ export default { diff --git a/panel/src/components/Forms/Blocks/Block.vue b/panel/src/components/Forms/Blocks/Block.vue index f3bdb36b2f..d3e95fd133 100644 --- a/panel/src/components/Forms/Blocks/Block.vue +++ b/panel/src/components/Forms/Blocks/Block.vue @@ -418,6 +418,6 @@ export default { content: ""; height: 2rem; width: 100%; - background: linear-gradient(to top, var(--color-white), transparent); + background: linear-gradient(to top, var(--block-color-back), transparent); } diff --git a/panel/src/components/Forms/Blocks/BlockOptions.vue b/panel/src/components/Forms/Blocks/BlockOptions.vue index f7d090dcee..aefd6dc11e 100644 --- a/panel/src/components/Forms/Blocks/BlockOptions.vue +++ b/panel/src/components/Forms/Blocks/BlockOptions.vue @@ -203,11 +203,11 @@ export default { From 36a55003d89ac26f1909c3c3f5e191c371e3bcb6 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 29 Nov 2024 11:24:15 +0100 Subject: [PATCH 11/19] Various additional fixes --- .../lab/components/browsers/browser/index.vue | 6 ----- .../components/Forms/Blocks/Types/Fields.vue | 2 +- .../components/Forms/Blocks/Types/Gallery.vue | 2 +- .../components/Forms/Blocks/Types/Quote.vue | 2 +- .../components/Forms/Blocks/Types/Table.vue | 2 +- panel/src/components/Forms/Counter.vue | 10 +++---- .../src/components/Forms/Field/LinkField.vue | 11 ++++---- .../src/components/Forms/Input/RangeInput.vue | 1 - .../components/Forms/Input/TogglesInput.vue | 5 ++-- .../Forms/Previews/LinkFieldPreview.vue | 4 +-- panel/src/components/Lab/DocsTypes.vue | 26 +++++++++---------- panel/src/components/Lab/Example.vue | 4 +-- .../components/Layout/Frame/ColorFrame.vue | 3 +++ panel/src/components/Layout/Stat.vue | 2 +- panel/src/components/Misc/Progress.vue | 2 +- panel/src/components/Navigation/Browser.vue | 24 ++++++++++++----- panel/src/components/Navigation/Button.vue | 6 ++--- .../src/components/Navigation/FileBrowser.vue | 10 ++++--- panel/src/components/Navigation/Tree.vue | 23 +++++++++------- panel/src/components/Text/Code.vue | 2 +- panel/src/components/Text/Highlight.vue | 16 ++++++------ panel/src/components/Text/Label.vue | 4 +-- panel/src/components/Text/Text.vue | 2 +- panel/src/components/Uploads/UploadItem.vue | 19 +++++++------- panel/src/styles/reset/range.css | 2 +- panel/src/styles/utilities/theme.css | 4 ++- src/Panel/Lab/Docs.php | 2 +- src/Panel/Lab/Example.php | 2 +- 28 files changed, 108 insertions(+), 90 deletions(-) diff --git a/panel/lab/components/browsers/browser/index.vue b/panel/lab/components/browsers/browser/index.vue index 216d7851ec..caa9e9f415 100644 --- a/panel/lab/components/browsers/browser/index.vue +++ b/panel/lab/components/browsers/browser/index.vue @@ -32,10 +32,4 @@ export default { .k-lab-example .k-headline { margin-bottom: 0.5rem; } -.k-lab-example .k-browser { - border: 1px solid var(--color-border); - background: var(--color-white); - border-radius: var(--rounded); - padding: var(--spacing-2); -} diff --git a/panel/src/components/Forms/Blocks/Types/Fields.vue b/panel/src/components/Forms/Blocks/Types/Fields.vue index 6f17e0c007..5bdce1167e 100644 --- a/panel/src/components/Forms/Blocks/Types/Fields.vue +++ b/panel/src/components/Forms/Blocks/Types/Fields.vue @@ -102,7 +102,7 @@ export default { } .k-block-type-fields-form { - background-color: var(--color-gray-200); + background-color: var(--panel-color-back); padding: var(--spacing-6) var(--spacing-6) var(--spacing-8); border-radius: var(--rounded-sm); container: column / inline-size; diff --git a/panel/src/components/Forms/Blocks/Types/Gallery.vue b/panel/src/components/Forms/Blocks/Types/Gallery.vue index 071b0265cd..eb00a53518 100644 --- a/panel/src/components/Forms/Blocks/Types/Gallery.vue +++ b/panel/src/components/Forms/Blocks/Types/Gallery.vue @@ -104,7 +104,7 @@ export default { } .k-block-type-gallery[data-disabled="true"] .k-block-type-gallery-placeholder { - background: var(--color-gray-250); + background: light-dark(var(--color-gray-250), var(--color-gray-950)); } .k-block-type-gallery-placeholder { background: var(--panel-color-back); diff --git a/panel/src/components/Forms/Blocks/Types/Quote.vue b/panel/src/components/Forms/Blocks/Types/Quote.vue index 3b4e926c52..d0e1f124fa 100644 --- a/panel/src/components/Forms/Blocks/Types/Quote.vue +++ b/panel/src/components/Forms/Blocks/Types/Quote.vue @@ -50,7 +50,7 @@ export default { diff --git a/panel/src/components/Forms/Field/LinkField.vue b/panel/src/components/Forms/Field/LinkField.vue index cf5feca861..b3bb201e6d 100644 --- a/panel/src/components/Forms/Field/LinkField.vue +++ b/panel/src/components/Forms/Field/LinkField.vue @@ -275,7 +275,7 @@ export default { .k-link-input-toggle.k-button { --button-height: var(--height-sm); --button-rounded: var(--rounded-sm); - --button-color-back: var(--color-gray-200); + --button-color-back: var(--panel-color-back); margin-inline-start: 0.25rem; } @@ -320,10 +320,11 @@ export default { .k-link-input-body { display: grid; overflow: hidden; - border-top: 1px solid var(--color-gray-300); - background: var(--color-gray-100); - --tree-color-back: var(--color-gray-100); - --tree-color-hover-back: var(--color-gray-200); + border-top: 1px solid var(--color-border); + background: var(--input-color-back); + --tree-color-back: var(--input-color-back); + --tree-branch-color-back: var(--input-color-back); + --tree-branch-hover-color-back: var(--panel-color-back); } .k-link-input-body[data-type="page"] .k-page-browser { diff --git a/panel/src/components/Forms/Input/RangeInput.vue b/panel/src/components/Forms/Input/RangeInput.vue index 1f1a8c3856..88da874ad3 100644 --- a/panel/src/components/Forms/Input/RangeInput.vue +++ b/panel/src/components/Forms/Input/RangeInput.vue @@ -155,7 +155,6 @@ export default { diff --git a/panel/src/components/Forms/Previews/LinkFieldPreview.vue b/panel/src/components/Forms/Previews/LinkFieldPreview.vue index 6c9bb74f59..7f69ee0453 100644 --- a/panel/src/components/Forms/Previews/LinkFieldPreview.vue +++ b/panel/src/components/Forms/Previews/LinkFieldPreview.vue @@ -81,8 +81,8 @@ export default { diff --git a/panel/src/components/Misc/Progress.vue b/panel/src/components/Misc/Progress.vue index d881a71801..c78e89948d 100644 --- a/panel/src/components/Misc/Progress.vue +++ b/panel/src/components/Misc/Progress.vue @@ -26,7 +26,7 @@ export default { diff --git a/panel/src/components/Navigation/Button.vue b/panel/src/components/Navigation/Button.vue index 2cd4a34eb8..1700707556 100644 --- a/panel/src/components/Navigation/Button.vue +++ b/panel/src/components/Navigation/Button.vue @@ -385,13 +385,13 @@ export default { font-variant-numeric: tabular-nums; line-height: 1.5; padding: 0 var(--spacing-1); - border-radius: 50%; + border-radius: 1em; text-align: center; font-size: 0.6rem; box-shadow: var(--shadow-md); background: var(--theme-color-back); - border: 1px solid var(--theme-color-500); - color: var(--theme-color-text); + border: 1px solid light-dark(var(--theme-color-500), var(--color-black)); + color: var(--theme-color-text-highlight); z-index: 1; } diff --git a/panel/src/components/Navigation/FileBrowser.vue b/panel/src/components/Navigation/FileBrowser.vue index 2d23c3fdee..f3bf9ebbe7 100644 --- a/panel/src/components/Navigation/FileBrowser.vue +++ b/panel/src/components/Navigation/FileBrowser.vue @@ -112,6 +112,10 @@ export default { diff --git a/panel/src/styles/reset/range.css b/panel/src/styles/reset/range.css index 865873da27..9daa5896e3 100644 --- a/panel/src/styles/reset/range.css +++ b/panel/src/styles/reset/range.css @@ -4,7 +4,7 @@ --range-thumb-size: 1rem; --range-thumb-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px 2px, rgba(0, 0, 0, 0.125) 0 0 0 1px; - --range-track-back: var(--color-gray-250); + --range-track-back: light-dark(var(--color-gray-300), var(--color-black)); --range-track-height: var(--range-thumb-size); } diff --git a/panel/src/styles/utilities/theme.css b/panel/src/styles/utilities/theme.css index ccdd7ef8ba..2d7397e67b 100644 --- a/panel/src/styles/utilities/theme.css +++ b/panel/src/styles/utilities/theme.css @@ -98,6 +98,8 @@ --theme-color-h: var(--color-gray-h); --theme-color-s: var(--color-gray-s); --theme-color-boost: 10%; + --theme-color-icon: var(--color-gray-600); + --theme-color-text: var(--color-black); } [data-theme^="white"], @@ -106,7 +108,7 @@ --theme-color-icon: var(--color-gray-800); --theme-color-text: var(--color-text); --theme-color-text-highlight: var(--theme-color-text); - --color-h: var(--color-black); + --color-h: var(--color-text); } /* Special Themes */ diff --git a/src/Panel/Lab/Docs.php b/src/Panel/Lab/Docs.php index 3e26a0f90a..62834dd1fb 100644 --- a/src/Panel/Lab/Docs.php +++ b/src/Panel/Lab/Docs.php @@ -52,7 +52,7 @@ function ($file) { return [ 'image' => [ 'icon' => 'book', - 'back' => 'white', + 'back' => 'light-dark(white, var(--color-gray-800))', ], 'text' => $component, 'link' => '/lab/docs/' . $component, diff --git a/src/Panel/Lab/Example.php b/src/Panel/Lab/Example.php index d4d74e6195..07ce6f2dde 100644 --- a/src/Panel/Lab/Example.php +++ b/src/Panel/Lab/Example.php @@ -173,7 +173,7 @@ public function toArray(): array return [ 'image' => [ 'icon' => $this->parent->icon(), - 'back' => 'white', + 'back' => 'light-dark(white, var(--color-gray-800))', ], 'text' => $this->title(), 'link' => $this->url() From 40753c13db25a5d53a98bf9f4fd4912499374aa1 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 29 Nov 2024 11:46:42 +0100 Subject: [PATCH 12/19] Better button variables --- panel/src/components/Navigation/Button.vue | 12 +++++------- panel/src/styles/utilities/theme.css | 7 ++++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/panel/src/components/Navigation/Button.vue b/panel/src/components/Navigation/Button.vue index 1700707556..92a1eeca51 100644 --- a/panel/src/components/Navigation/Button.vue +++ b/panel/src/components/Navigation/Button.vue @@ -240,6 +240,7 @@ export default { --button-rounded: var(--spacing-1); --button-text-display: block; --button-icon-display: block; + --button-filled-color-back: light-dark(var(--color-gray-300), var(--color-gray-950)); } .k-button { @@ -305,23 +306,20 @@ export default { /** Filled Buttons **/ .k-button:where([data-variant="filled"]) { - --button-color-back: light-dark(var(--color-gray-300), var(--color-gray-950)); + --button-color-back: var(--button-filled-color-back); } .k-button:where([data-variant="filled"]):not([aria-disabled="true"]):hover { filter: brightness(97%); } .k-button:where([data-variant="filled"][data-theme]) { - --button-color-icon: var(--theme-color-700); + --button-color-icon: var(--theme-color-icon-highlight); --button-color-back: var(--theme-color-back); --button-color-text: var(--theme-color-text-highlight); } .k-button:where([data-theme$="-icon"][data-variant="filled"]) { - --button-color-icon: hsl( - var(--theme-color-hs), - 57% - ); /* slightly improve the contrast */ - --button-color-back: light-dark(var(--color-gray-300), var(--color-gray-950)); + --button-color-icon: var(--theme-color-icon); + --button-color-back: var(--button-filled-color-back); --button-color-text: currentColor; } diff --git a/panel/src/styles/utilities/theme.css b/panel/src/styles/utilities/theme.css index 2d7397e67b..2d5ee1bdce 100644 --- a/panel/src/styles/utilities/theme.css +++ b/panel/src/styles/utilities/theme.css @@ -25,6 +25,10 @@ --theme-color-900: hsl(var(--theme-color-hs), var(--theme-color-l-900)); --theme-color-border: light-dark(var(--theme-color-500), var(--theme-color-600)); + --theme-color-back: light-dark(var(--theme-color-400), var(--theme-color-500)); + --theme-color-hover: var(--theme-color-600); + --theme-color-icon: var(--theme-color-600); + --theme-color-icon-highlight: var(--theme-color-700); --theme-color-text: light-dark(var(--theme-color-900), var(--theme-color-400)); --theme-color-text-dimmed: hsl( var(--theme-color-h), @@ -32,9 +36,6 @@ 50% ); --theme-color-text-highlight: var(--theme-color-900); - --theme-color-back: var(--theme-color-500); - --theme-color-hover: var(--theme-color-500); - --theme-color-icon: light-dark(var(--theme-color-700), var(--theme-color-600)); } /* Color themes */ From 0688d087a012bb27955bdc9f79d0c800b9c324a8 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 29 Nov 2024 11:48:59 +0100 Subject: [PATCH 13/19] Better link colors --- panel/src/components/Text/Text.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/src/components/Text/Text.vue b/panel/src/components/Text/Text.vue index dc975aca42..265e93cbe9 100644 --- a/panel/src/components/Text/Text.vue +++ b/panel/src/components/Text/Text.vue @@ -49,8 +49,8 @@ export default { :root { --text-font-size: 1em; --text-line-height: 1.5; - --link-color: light-dark(var(--color-blue-800), var(--color-blue-600)); - --link-color-hover: light-dark(var(--color-black), var(--color-white)); + --link-color: light-dark(var(--color-blue-800), var(--color-blue-500)); + --link-color-hover: light-dark(var(--color-blue-700), var(--color-blue-400)); --link-underline-offset: 2px; } From 11d2565503d8990d4ca2ab2a9f4b82af99dfc60f Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 29 Nov 2024 12:03:34 +0100 Subject: [PATCH 14/19] Adjusted color values --- panel/src/styles/config/colors.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panel/src/styles/config/colors.css b/panel/src/styles/config/colors.css index afbcc19ec7..2bd5629b56 100644 --- a/panel/src/styles/config/colors.css +++ b/panel/src/styles/config/colors.css @@ -299,11 +299,11 @@ --color-l-300: 85%; --color-l-400: 75%; --color-l-500: 65%; - --color-l-600: 50%; + --color-l-600: 52%; --color-l-700: 40%; - --color-l-750: 35%; - --color-l-800: 25%; - --color-l-850: 18%; + --color-l-750: 36%; + --color-l-800: 27%; + --color-l-850: 22%; --color-l-900: 13%; --color-l-950: 8%; --color-l-1000: 5%; From f48255bade44f0c35134efc90d0f5f6d04e00c74 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 29 Nov 2024 13:06:20 +0100 Subject: [PATCH 15/19] Fix choices in dark mode --- panel/src/styles/reset/choice.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/src/styles/reset/choice.css b/panel/src/styles/reset/choice.css index 9e4d6f259a..870d0d41c4 100644 --- a/panel/src/styles/reset/choice.css +++ b/panel/src/styles/reset/choice.css @@ -1,6 +1,6 @@ :root { - --choice-color-back: light-dark(var(--color-white), var(--color-gray-850)); - --choice-color-border: light-dark(var(--color-gray-500), var(--color-black)); + --choice-color-back: light-dark(var(--color-white), var(--color-gray-800)); + --choice-color-border: light-dark(var(--color-gray-500), var(--color-gray-600)); --choice-color-checked: var(--color-black); --choice-color-disabled: var(--color-gray-400); --choice-color-icon: var(--color-light); From e5d029387b8f51ba3d5b66096ebbf7b184687cd5 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 29 Nov 2024 13:08:39 +0100 Subject: [PATCH 16/19] Improve text color --- panel/src/styles/utilities/theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/src/styles/utilities/theme.css b/panel/src/styles/utilities/theme.css index 2d5ee1bdce..cf572f1a50 100644 --- a/panel/src/styles/utilities/theme.css +++ b/panel/src/styles/utilities/theme.css @@ -29,7 +29,7 @@ --theme-color-hover: var(--theme-color-600); --theme-color-icon: var(--theme-color-600); --theme-color-icon-highlight: var(--theme-color-700); - --theme-color-text: light-dark(var(--theme-color-900), var(--theme-color-400)); + --theme-color-text: light-dark(var(--theme-color-800), var(--theme-color-500)); --theme-color-text-dimmed: hsl( var(--theme-color-h), calc(var(--theme-color-s) - 60%), From 4ec62ad74808bf9e6399383b307840453f663e02 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Mon, 2 Dec 2024 20:19:31 +0100 Subject: [PATCH 17/19] Tweak color lightness values --- panel/src/styles/config/colors.css | 29 +++++++++++++++------------- panel/src/styles/utilities/theme.css | 22 ++++++++++++++------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/panel/src/styles/config/colors.css b/panel/src/styles/config/colors.css index 2bd5629b56..63f04a9f54 100644 --- a/panel/src/styles/config/colors.css +++ b/panel/src/styles/config/colors.css @@ -257,7 +257,10 @@ /** Shortcuts **/ --color-black: hsl(0, 0%, var(--color-l-min)); --color-border: light-dark(var(--color-gray-300), var(--color-gray-800)); - --color-border-dimmed: light-dark(hsla(0, 0%, var(--color-l-min), 0.1), var(--color-gray-850)); + --color-border-dimmed: light-dark( + hsla(0, 0%, var(--color-l-min), 0.1), + var(--color-gray-850) + ); --color-dark: var(--color-gray-900); --color-focus: var(--color-blue-600); --color-light: var(--color-gray-200); @@ -293,19 +296,19 @@ color-scheme: dark; --color-l-max: 100%; - --color-l-100: 98%; - --color-l-200: 94%; - --color-l-250: 90%; - --color-l-300: 85%; - --color-l-400: 75%; - --color-l-500: 65%; + --color-l-100: 95%; + --color-l-200: 86%; + --color-l-250: 78%; + --color-l-300: 73%; + --color-l-400: 67%; + --color-l-500: 62%; --color-l-600: 52%; --color-l-700: 40%; - --color-l-750: 36%; - --color-l-800: 27%; - --color-l-850: 22%; - --color-l-900: 13%; - --color-l-950: 8%; - --color-l-1000: 5%; + --color-l-750: 33%; + --color-l-800: 26%; + --color-l-850: 19%; + --color-l-900: 11%; + --color-l-950: 6%; + --color-l-1000: 3%; --color-l-min: 0%; } diff --git a/panel/src/styles/utilities/theme.css b/panel/src/styles/utilities/theme.css index cf572f1a50..6ca00dd79d 100644 --- a/panel/src/styles/utilities/theme.css +++ b/panel/src/styles/utilities/theme.css @@ -24,16 +24,24 @@ --theme-color-800: hsl(var(--theme-color-hs), var(--theme-color-l-800)); --theme-color-900: hsl(var(--theme-color-hs), var(--theme-color-l-900)); - --theme-color-border: light-dark(var(--theme-color-500), var(--theme-color-600)); - --theme-color-back: light-dark(var(--theme-color-400), var(--theme-color-500)); + --theme-color-border: light-dark( + var(--theme-color-500), + var(--theme-color-600) + ); + --theme-color-back: light-dark( + var(--theme-color-400), + var(--theme-color-500) + ); --theme-color-hover: var(--theme-color-600); --theme-color-icon: var(--theme-color-600); --theme-color-icon-highlight: var(--theme-color-700); - --theme-color-text: light-dark(var(--theme-color-800), var(--theme-color-500)); - --theme-color-text-dimmed: hsl( - var(--theme-color-h), - calc(var(--theme-color-s) - 60%), - 50% + --theme-color-text: light-dark( + var(--theme-color-800), + var(--theme-color-500) + ); + --theme-color-text-dimmed: light-dark( + hsl(var(--theme-color-h), calc(var(--theme-color-s) - 60%), 50%), + hsl(var(--theme-color-h), calc(var(--theme-color-s) - 60%), 60%) ); --theme-color-text-highlight: var(--theme-color-900); } From f44228bed5d63e7cd5002edec37d81c3f9920d17 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Mon, 2 Dec 2024 20:57:37 +0100 Subject: [PATCH 18/19] Bunch of fixes --- panel/lab/basics/icons/1_iconset/index.vue | 1 + panel/lab/components/toolbar/3_writer/index.vue | 2 +- .../Forms/Previews/BubblesFieldPreview.vue | 2 +- panel/src/components/Layout/Frame/Frame.vue | 2 +- panel/src/components/Layout/Stat.vue | 5 ++++- panel/src/components/Navigation/Browser.vue | 12 +++++++++--- panel/src/components/Navigation/Tag.vue | 4 ++-- panel/src/components/Views/System/SystemSecurity.vue | 2 +- panel/src/styles/config/colors.css | 12 ++++++------ panel/src/styles/utilities/theme.css | 12 +++++++----- 10 files changed, 33 insertions(+), 21 deletions(-) diff --git a/panel/lab/basics/icons/1_iconset/index.vue b/panel/lab/basics/icons/1_iconset/index.vue index 8978558be4..4469d42530 100644 --- a/panel/lab/basics/icons/1_iconset/index.vue +++ b/panel/lab/basics/icons/1_iconset/index.vue @@ -36,6 +36,7 @@ export default { align-items: center; gap: 0.75rem; padding: var(--spacing-2); + color: var(--color-black); background: var(--color-white); border-radius: var(--rounded); box-shadow: var(--shadow); diff --git a/panel/lab/components/toolbar/3_writer/index.vue b/panel/lab/components/toolbar/3_writer/index.vue index b95dda0f11..4887925bd8 100644 --- a/panel/lab/components/toolbar/3_writer/index.vue +++ b/panel/lab/components/toolbar/3_writer/index.vue @@ -26,7 +26,7 @@ export default { diff --git a/panel/src/components/Forms/Previews/BubblesFieldPreview.vue b/panel/src/components/Forms/Previews/BubblesFieldPreview.vue index 531e70ca3f..9baf444ee9 100644 --- a/panel/src/components/Forms/Previews/BubblesFieldPreview.vue +++ b/panel/src/components/Forms/Previews/BubblesFieldPreview.vue @@ -62,7 +62,7 @@ export default {