From 9126bbcf4ac5e4c6dd8e2895594fb19b22d28e5e Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Fri, 8 May 2026 12:02:49 +0800 Subject: [PATCH] refactor: standalone btn-icon class, no btn inheritance --- internal/web/ui/assets/style.css | 3 ++- internal/web/ui/templates/face_gallery.html | 4 ++-- internal/web/ui/templates/layout.html | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/web/ui/assets/style.css b/internal/web/ui/assets/style.css index 573cac1..49eaa08 100644 --- a/internal/web/ui/assets/style.css +++ b/internal/web/ui/assets/style.css @@ -170,7 +170,8 @@ main{padding:24px 28px 36px;max-width:1440px} .btn,button,input,select,textarea{font:inherit} .btn,button{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:5px 10px;border-radius:var(--radius);border:1px solid var(--border-strong);background:var(--button-soft);color:var(--button-soft-text);cursor:pointer;font-size:11px;font-weight:500;line-height:1.15;min-height:30px;transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease} -.btn-icon{padding:0!important;width:22px!important;height:22px!important;min-height:0!important;gap:0;border-radius:3px;flex-shrink:0} +.btn-icon{display:inline-flex;align-items:center;justify-content:center;gap:0;padding:0;width:22px;height:22px;min-height:0;border-radius:var(--radius);border:1px solid var(--border-strong);background:var(--button-soft);color:var(--button-soft-text);cursor:pointer;font-size:11px;font-weight:500;line-height:1;flex-shrink:0;transition:background-color .16s ease} +.btn-icon:hover{background:var(--button-soft-hover)} .btn:hover,button:hover{background:var(--button-soft-hover);border-color:#c3ccd6} .btn.primary,button.primary{background:var(--primary-strong);border-color:var(--primary-strong);color:#f8fafc} .btn.primary:hover,button.primary:hover{background:var(--primary-strong-hover);border-color:var(--primary-strong-hover)} diff --git a/internal/web/ui/templates/face_gallery.html b/internal/web/ui/templates/face_gallery.html index b9be551..3f62e3a 100644 --- a/internal/web/ui/templates/face_gallery.html +++ b/internal/web/ui/templates/face_gallery.html @@ -35,10 +35,10 @@
{{.Name}} {{.PhotoCount}}张
- +
- +
diff --git a/internal/web/ui/templates/layout.html b/internal/web/ui/templates/layout.html index bf51d9e..2bd9770 100644 --- a/internal/web/ui/templates/layout.html +++ b/internal/web/ui/templates/layout.html @@ -6,7 +6,7 @@ {{.Title}} - +