From 008cb40cb8e30f58a204418a413409c57f5dd58f Mon Sep 17 00:00:00 2001 From: Samuel Gunter <29130894+Samathingamajig@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:05:34 -0600 Subject: [PATCH] style: move input click style to central place (#532) Co-authored-by: doprz <52579214+doprz@users.noreply.github.com> --- src/views/components/common/FileUpload.tsx | 2 +- unocss.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/components/common/FileUpload.tsx b/src/views/components/common/FileUpload.tsx index 045f0c00..2bb3a9c2 100644 --- a/src/views/components/common/FileUpload.tsx +++ b/src/views/components/common/FileUpload.tsx @@ -57,7 +57,7 @@ export default function FileUpload({ } satisfies React.CSSProperties } className={clsx( - 'btn has-enabled:active:scale-96', + 'btn', { 'text-white! bg-opacity-100 hover:enabled:shadow-md active:enabled:shadow-sm shadow-black/20': variant === 'filled', diff --git a/unocss.config.ts b/unocss.config.ts index 073cf74e..de84d0a0 100644 --- a/unocss.config.ts +++ b/unocss.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ ], shortcuts: { focusable: 'outline-none ring-blue-500/50 dark:ring-blue-400/60 ring-0 focus-visible:ring-4', - btn: 'h-10 w-auto flex cursor-pointer justify-center items-center gap-spacing-3 rounded-1 px-spacing-5 py-0 text-4.5 btn-transition disabled:(cursor-not-allowed opacity-50) active:enabled:scale-96 focusable', + btn: 'h-10 w-auto flex cursor-pointer justify-center items-center gap-spacing-3 rounded-1 px-spacing-5 py-0 text-4.5 btn-transition disabled:(cursor-not-allowed opacity-50) active:enabled:scale-96 active:has-enabled:scale-96 focusable', link: 'text-ut-burntorange link:text-ut-burntorange underline underline-offset-2 hover:text-ut-orange focus-visible:text-ut-orange focusable btn-transition ease-out-expo', linkanimate: 'relative cursor-pointer transition duration-100 ease-out after:(absolute left-0.4 right-0.4 h-2px scale-x-95 bg-ut-orange opacity-0 transition duration-250 ease-out-expo content-empty -bottom-0.75 -translate-y-0.5) active:scale-95 hover:text-ut-orange focus-visible:text-ut-orange hover:after:(opacity-100) !hover:after:translate-y-0 !hover:after:scale-x-100',