From 08bc7b163bf68c3a5e519dd7d515f7c5894f0be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 22 Aug 2023 09:54:30 +0200 Subject: [PATCH 1/4] feat: Enhance dark mode (fix #5034) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/cards/CardItem.vue | 24 ++++++++++++++++-------- src/components/cards/badges/DueDate.vue | 12 +++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/components/cards/CardItem.vue b/src/components/cards/CardItem.vue index 57d85947e..f0a18cf90 100644 --- a/src/components/cards/CardItem.vue +++ b/src/components/cards/CardItem.vue @@ -200,27 +200,28 @@ export default { @import './../../css/animations'; @import './../../css/variables'; + @mixin dark-card { + border: 2px solid var(--color-border-dark); + box-shadow: none; + } + .card { - transition: box-shadow 0.1s ease-in-out; - box-shadow: 0 0 2px 0 var(--color-box-shadow); + transition: border 0.1s ease-in-out; border-radius: var(--border-radius-large); font-size: 100%; background-color: var(--color-main-background); margin-bottom: $card-spacing; + border: 2px solid var(--color-border); &:deep(*) { cursor: pointer; } - body.dark &, body.theme--dark & { - border: 2px solid var(--color-border); - } - &:hover { - box-shadow: 0 0 5px 0 var(--color-box-shadow); + border: 2px solid var(--color-border-dark); } &.current-card { - box-shadow: 0 0 5px 1px var(--color-box-shadow); + border: 2px solid var(--color-primary-element); } .card-upper { @@ -326,4 +327,11 @@ export default { color: transparent; } } + + @media (prefers-color-scheme: dark) { + .card { + @include dark-card; + } + + } diff --git a/src/components/cards/badges/DueDate.vue b/src/components/cards/badges/DueDate.vue index ad1db8600..1ad226c08 100644 --- a/src/components/cards/badges/DueDate.vue +++ b/src/components/cards/badges/DueDate.vue @@ -75,12 +75,10 @@ export default { border-radius: 3px; margin-top: 9px; margin-bottom: 9px; - padding: 3px 4px; - padding-right: 0; + padding: 3px 0 3px 4px; font-size: 90%; display: flex; align-items: center; - opacity: .5; flex-shrink: 1; z-index: 2; @@ -89,19 +87,15 @@ export default { } &.overdue { - background-color: var(--color-error); - color: var(--color-primary-element-text); - opacity: .7; + color: var(--color-error-text); padding: 3px 4px; } &.now { - background-color: var(--color-warning); - opacity: .7; + color: var(--color-warning-text); padding: 3px 4px; } &.next { background-color: var(--color-background-dark); - opacity: .7; padding: 3px 4px; } From f53785ef546da999dc457c4a091dc3a41d4ccf18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 30 Aug 2023 16:30:32 +0200 Subject: [PATCH 2/4] fix: Due date badge in dark mode / compact mode (fix #4386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/cards/badges/DueDate.vue | 76 ++++++++++++++++--------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/src/components/cards/badges/DueDate.vue b/src/components/cards/badges/DueDate.vue index 1ad226c08..0a584f528 100644 --- a/src/components/cards/badges/DueDate.vue +++ b/src/components/cards/badges/DueDate.vue @@ -21,18 +21,31 @@ -->