From ac0f1dd4abe4f5ba8832d239494d2b669f802b34 Mon Sep 17 00:00:00 2001 From: Tobias Kohr Date: Wed, 25 Sep 2024 17:21:35 +0200 Subject: [PATCH] fix(badge): adapt dashboard badge font sizes and padding and revert generic badge font size and padding --- .../dashboard-menu/dashboard-menu.component.html | 10 +++++++--- .../src/lib/results-table/results-table.component.html | 9 +++++---- tailwind.base.css | 5 +++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/metadata-editor/src/app/dashboard/dashboard-menu/dashboard-menu.component.html b/apps/metadata-editor/src/app/dashboard/dashboard-menu/dashboard-menu.component.html index 7ded10a5ee..425d9d2591 100644 --- a/apps/metadata-editor/src/app/dashboard/dashboard-menu/dashboard-menu.component.html +++ b/apps/metadata-editor/src/app/dashboard/dashboard-menu/dashboard-menu.component.html @@ -72,9 +72,13 @@ edit_note dashboard.records.myDraft - {{ - draftsCount - }} + {{ draftsCount }} {{ item.title }} {{ formats[0] }} {{ formats[1] }} -
+
+{{ formats.slice(2).length }}
diff --git a/tailwind.base.css b/tailwind.base.css index de0836deef..210e076e71 100644 --- a/tailwind.base.css +++ b/tailwind.base.css @@ -132,12 +132,13 @@ /* BADGE CLASS */ .gn-ui-badge { --rounded: var(--gn-ui-badge-rounded, 0.25em); - --padding: var(--gn-ui-badge-padding, 0.375em 0.875em); + --padding: var(--gn-ui-badge-padding, 0.375em 0.75em); + --text-size: var(--gn-ui-badge-text-size, 0.875em); --text-color: var(--gn-ui-badge-text-color, var(--color-gray-50)); --background-color: var(--gn-ui-badge-background-color, black); --opacity: var(--gn-ui-badge-opacity, 0.7); @apply opacity-[--opacity] p-[--padding] rounded-[--rounded] - font-medium text-[length:0.875em] text-[color:--text-color] text-xs bg-[color:--background-color] flex justify-center items-center content-center; + font-medium text-[length:--text-size] text-[color:--text-color] bg-[color:--background-color] flex justify-center items-center content-center; } /* makes sure icons will not make the badges grow vertically; also make size proportional */ .gn-ui-badge mat-icon.mat-icon {