From fabff49d11392d61a7a85fabb4537f68876fa88e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Jul 2026 07:29:40 +0800 Subject: [PATCH] fix(footer): stop day/night brand logos both showing Size rules were forcing display:inline-block on both footer logos with higher specificity than the night-hide rule. Decouple display toggle, raise selector weight, align dark hooks with header/theme.js, and drop unused part-1 light/dark logo-img rules. --- assets/css/frontend/footer/part-1.css | 11 +---------- assets/css/frontend/footer/zibll-shell.css | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/assets/css/frontend/footer/part-1.css b/assets/css/frontend/footer/part-1.css index 8dce9a8e..e6bb9842 100644 --- a/assets/css/frontend/footer/part-1.css +++ b/assets/css/frontend/footer/part-1.css @@ -177,7 +177,7 @@ /* §2.3 三列结构化字段 */ -/* 品牌 Logo */ +/* 品牌 Logo — day/night visibility lives in zibll-shell.css */ .site-footer__logo { margin-bottom: 16px; } @@ -185,15 +185,6 @@ max-height: 48px; width: auto; } -.site-footer__logo-img--dark { - display: none; -} -[data-theme="dark"] .site-footer__logo-img--light { - display: none; -} -[data-theme="dark"] .site-footer__logo-img--dark { - display: inline-block; -} /* 标准联系项 */ .site-footer__contact-std { diff --git a/assets/css/frontend/footer/zibll-shell.css b/assets/css/frontend/footer/zibll-shell.css index 92fff7dd..93f03f8e 100644 --- a/assets/css/frontend/footer/zibll-shell.css +++ b/assets/css/frontend/footer/zibll-shell.css @@ -53,21 +53,27 @@ height: 40px; width: auto; max-width: 180px; - display: inline-block; vertical-align: middle; } -.footer .site-footer__logo--night { +/* Light/dark footer logo toggle — keep display out of size rules so hide wins */ +.footer a.footer-logo .site-footer__logo--day { + display: inline-block; +} + +.footer a.footer-logo .site-footer__logo--night { display: none; } -html.dark .footer .site-footer__logo--day, -body.dark-theme .footer .site-footer__logo--day { +html.dark .footer a.footer-logo .site-footer__logo--day, +[data-theme="dark"] .footer a.footer-logo .site-footer__logo--day, +body.dark-theme .footer a.footer-logo .site-footer__logo--day { display: none; } -html.dark .footer .site-footer__logo--night, -body.dark-theme .footer .site-footer__logo--night { +html.dark .footer a.footer-logo .site-footer__logo--night, +[data-theme="dark"] .footer a.footer-logo .site-footer__logo--night, +body.dark-theme .footer a.footer-logo .site-footer__logo--night { display: inline-block; }