From 079fd455364a69a483b3666f713e62ba0064d195 Mon Sep 17 00:00:00 2001 From: Zephyruso <176294927+Zephyruso@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:12:20 +0800 Subject: [PATCH] fix: opacity style --- src/assets/main.css | 29 ++++++++++++------- .../connections/ConnectionTable.vue | 12 ++++---- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/assets/main.css b/src/assets/main.css index fa090aae..4218bcf8 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -10,30 +10,37 @@ @layer components { .card, .collapse { - background-color: var(--fallback-b1, oklch(var(--b1))); + background-color: var(--fallback-b1, oklch(var(--b1) / var(--tw-bg-opacity, 1))); @apply rounded-xl shadow-md; } + + .table tr { + @apply border-b-0; + } } @for $i from 0 to 100 { .custom-background.custom-background-$(i) { + .bg-base-100, + .bg-base-200, + .bg-neutral, .card, .collapse, - .bg-base-100, - .table { - background-color: var(--fallback-b1, oklch(var(--b1) / calc($(i) / 100))); + .table, + .drawer-side, + .tabs, + .input, + .btn, + .select, + .menu .active, + .table tbody tr { + --tw-border-opacity: calc($(i) / 100); + --tw-bg-opacity: calc($(i) / 100); } .drawer-content.bg-base-200\/40 { background-color: transparent; } - - .drawer-side, - .tabs, - .bg-base-200, - .table tbody tr:nth-child(even) { - background-color: var(--fallback-b2, oklch(var(--b2) / calc($(i) / 100))); - } } } diff --git a/src/components/connections/ConnectionTable.vue b/src/components/connections/ConnectionTable.vue index 8281bd05..d97c519b 100644 --- a/src/components/connections/ConnectionTable.vue +++ b/src/components/connections/ConnectionTable.vue @@ -1,13 +1,13 @@