From fd9c314d5595152b549e1ce8a8ee7d352e503323 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 28 Jun 2026 21:39:29 +0800 Subject: [PATCH] Refine card hover borders across subtitle and torrent cards --- src/components/cards/SubtitleCard.vue | 7 ++----- src/components/cards/SubtitleItem.vue | 7 ++----- src/components/cards/TorrentCard.vue | 7 ++----- src/components/cards/TorrentItem.vue | 7 ++----- src/styles/common.scss | 9 +++++++++ 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/components/cards/SubtitleCard.vue b/src/components/cards/SubtitleCard.vue index f0279897..28e0bc50 100644 --- a/src/components/cards/SubtitleCard.vue +++ b/src/components/cards/SubtitleCard.vue @@ -208,15 +208,12 @@ watch( inline-size: 100%; } -.subtitle-card-hover-area:hover .subtitle-card { - transform: translate3d(0, -0.25rem, 0); -} - .subtitle-card { - border: 1px solid transparent; + border: var(--app-card-light-border); } .subtitle-card-hover-area:hover .subtitle-card { border-color: rgba(var(--v-theme-primary), 0.3); + transform: translate3d(0, -0.25rem, 0); } diff --git a/src/components/cards/SubtitleItem.vue b/src/components/cards/SubtitleItem.vue index d8d9783a..f6734196 100644 --- a/src/components/cards/SubtitleItem.vue +++ b/src/components/cards/SubtitleItem.vue @@ -211,15 +211,12 @@ watch( inline-size: 100%; } -.subtitle-item-hover-area:hover .subtitle-item { - transform: translate3d(0, -0.25rem, 0); -} - .subtitle-item { - border: 1px solid transparent; + border: var(--app-card-light-border); } .subtitle-item-hover-area:hover .subtitle-item { border-color: rgba(var(--v-theme-primary), 0.3); + transform: translate3d(0, -0.25rem, 0); } diff --git a/src/components/cards/TorrentCard.vue b/src/components/cards/TorrentCard.vue index 3fb4c753..a1e6639e 100644 --- a/src/components/cards/TorrentCard.vue +++ b/src/components/cards/TorrentCard.vue @@ -321,17 +321,14 @@ watch( inline-size: 100%; } -.torrent-card-hover-area:hover .torrent-card { - transform: translate3d(0, -0.25rem, 0); -} - /* 卡片悬停效果 */ .torrent-card { - border: 1px solid transparent; + border: var(--app-card-light-border); } .torrent-card-hover-area:hover .torrent-card { border-color: rgba(var(--v-theme-primary), 0.3); + transform: translate3d(0, -0.25rem, 0); } /* 优惠标签样式 */ diff --git a/src/components/cards/TorrentItem.vue b/src/components/cards/TorrentItem.vue index 61503cc9..82810ae1 100644 --- a/src/components/cards/TorrentItem.vue +++ b/src/components/cards/TorrentItem.vue @@ -267,16 +267,13 @@ watch( inline-size: 100%; } -.torrent-item-hover-area:hover .torrent-item { - transform: translate3d(0, -0.25rem, 0); -} - .torrent-item { - border: 1px solid transparent; + border: var(--app-card-light-border); } .torrent-item-hover-area:hover .torrent-item { border-color: rgba(var(--v-theme-primary), 0.3); + transform: translate3d(0, -0.25rem, 0); } .chip-season { diff --git a/src/styles/common.scss b/src/styles/common.scss index 523ded71..1a703341 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -82,6 +82,8 @@ html { --app-overlay-radius: var(--app-vuetify-rounded-lg); --app-surface-border-opacity: 0.06; --app-surface-border: 1px solid rgba(var(--v-theme-on-surface), var(--app-surface-border-opacity)); + --app-card-light-border-opacity: 0.12; + --app-card-light-border: 1px solid rgba(var(--v-theme-on-surface), var(--app-card-light-border-opacity)); --app-card-rest-shadow: var(--app-elevation-0); --app-card-hover-shadow: var(--app-elevation-0); --app-fab-shadow: var(--app-elevation-0); @@ -100,6 +102,7 @@ html { html[data-theme-skin='bordered'] { --app-surface-border-opacity: 0.1; + --app-card-light-border-opacity: 0.16; } // 默认档位保留按钮等 control 的 Vuetify 原始圆角,同时让卡片、列表、弹窗和输入区使用更舒展的大圆角。 @@ -193,6 +196,11 @@ html[data-theme-radius='extra'] { } // 统一卡片上浮反馈;hover 命中区域应放在静止外层,避免上浮后底边反复触发 mouseleave。 +.v-card.app-hover-lift-card, +.subscribe-card-shell { + border: var(--app-card-light-border); +} + .app-hover-lift-card { transition: transform 0.3s ease, box-shadow 0.2s ease; transform: translateZ(0); @@ -517,6 +525,7 @@ html[data-theme-skin='bordered'] { // 应用类信息卡片:固定右侧媒体槽位,避免图片被左侧文字挤压变形。 .app-card-shell { position: relative; + border: var(--app-card-light-border); block-size: 100%; }