fix(header): cache-bust frontend CSS modules via filemtime

header-components used fixed AKSRT_VERSION so card-gap fixes never reached browsers; inline gap rules and filemtime enqueue.
This commit is contained in:
2026-07-24 11:48:25 +08:00
parent 8bad0c1252
commit 9aa0bd0755
2 changed files with 70 additions and 1 deletions
+68
View File
@@ -4,3 +4,71 @@
@import url("header-components/dark-theme.css");
@import url("header-components/card-device-visibility.css");
@import url("header-components/search-keywords-row.css");
/* === homepage icon-card seams (must not rely solely on @import cache) === */
.header-slider-card .flex,
.header-components-card .flex { display: flex; }
.header-slider-card .flex.jse,
.header-components-card .flex.jse,
.header-slider-card .jse,
.header-components-card .jse { justify-content: space-evenly; }
.header-slider-card .flex-row,
.header-components-card .flex-row { flex-direction: row; }
.header-slider-card .flex.ac,
.header-components-card .flex.ac,
.header-slider-card .ac,
.header-components-card .ac { align-items: center; }
.header-slider-card .gutters-5,
.header-components-card .gutters-5,
.header-slider-card .flex.jse.flex-row,
.header-components-card .flex.jse.flex-row {
margin: -5px;
}
.header-slider-card .gutters-5 > *,
.header-components-card .gutters-5 > *,
.header-slider-card .flex.jse.flex-row > *,
.header-components-card .flex.jse.flex-row > * {
padding: 5px !important;
box-sizing: border-box;
}
.header-slider-card .flex1,
.header-components-card .flex1,
.header-slider-card .flex .flex1,
.header-components-card .flex .flex1 {
flex: 1 1 0;
overflow: hidden;
min-width: 0;
}
.header-slider-card,
.header-components-card {
position: relative;
margin-top: -40px;
z-index: 1;
width: 100%;
}
.header-slider-card.container,
.header-components-card.container {
width: 100%;
max-width: var(--container, var(--mian-max-width, 1200px));
margin-left: auto;
margin-right: auto;
padding-left: 15px;
padding-right: 15px;
box-sizing: border-box;
}
.header-slider-card .icon-cover-card.zib-widget,
.header-components-card .icon-cover-card.zib-widget {
margin-bottom: 0;
padding: var(--card-padding, 15px);
box-shadow: 0 0 10px var(--main-shadow, var(--shadow-sm, rgba(116, 116, 116, 0.08)));
border-radius: var(--main-radius, var(--radius, 8px));
background-color: var(--main-bg-color, var(--surface-1, #fff));
height: 100%;
box-sizing: border-box;
}
.filter-blur .header-slider-card .zib-widget,
.filter-blur .header-components-card .zib-widget {
-webkit-backdrop-filter: saturate(5) blur(20px);
backdrop-filter: saturate(5) blur(20px);
background: var(--blur-bg, rgba(255, 255, 255, 0.75));
}
+2 -1
View File
@@ -72,11 +72,12 @@ trait ScriptsPart1b {
$deps = [$core_dep];
$enqueue_module = function ($slug) use ($base_uri, $version, $deps) {
$path = get_template_directory() . '/assets/css/frontend/' . $slug . '.css';
wp_enqueue_style(
'aksrt-' . $slug,
$base_uri . '/assets/css/frontend/' . $slug . '.css',
$deps,
$version
(file_exists($path) ? (string) filemtime($path) : $version)
);
};