修复顶部多功能组件搜索框的两个问题

This commit is contained in:
2026-08-20 14:12:35 +08:00
parent 41a1b4f465
commit c4e162839c
2 changed files with 29 additions and 0 deletions
+18
View File
@@ -112,6 +112,24 @@ main.container,
font-size: 12px; font-size: 12px;
} }
/* Keep the header multifunction search stable across route-specific CSS.
* Some routes load a later .abs-right utility, while the global input focus
* ring looks like an extra border against this transparent pill field. */
.header-slider-search .line-form-input:focus,
.header-slider-search .line-form-input:focus-visible {
border: 0;
outline: 0;
box-shadow: none;
}
.header-slider-search .line-form .abs-right {
position: absolute;
right: 0.7em;
top: 50%;
transform: translateY(-50%);
margin-top: 0;
}
@media (min-width: 576px) { @media (min-width: 576px) {
.container, .container,
main.container { main.container {
@@ -190,6 +190,17 @@ test('footer brand icons keep the Brands font when legacy fa prefix is present',
assert.match(icons, /'wechat'\s*=>\s*'fa fab fa-weixin'/) assert.match(icons, /'wechat'\s*=>\s*'fa fab fa-weixin'/)
}) })
test('header multifunction search keeps focus and submit alignment route-independent', () => {
assert.match(
frontendBaseCss,
/\.header-slider-search \.line-form-input:focus,[\s\S]*?\.header-slider-search \.line-form-input:focus-visible\s*\{[^}]*border:\s*0;[^}]*outline:\s*0;[^}]*box-shadow:\s*none;/,
)
assert.match(
frontendBaseCss,
/\.header-slider-search \.line-form \.abs-right\s*\{[^}]*position:\s*absolute;[^}]*right:\s*0\.7em;[^}]*top:\s*50%;[^}]*transform:\s*translateY\(-50%\);[^}]*margin-top:\s*0;/,
)
})
test('save contract rejects invalid input and round-trips canonical nested values', () => { test('save contract rejects invalid input and round-trips canonical nested values', () => {
const result = spawnSync(process.env.PHP_BINARY || 'php', [path.join(__dirname, 'page-display-save-harness.php')], { const result = spawnSync(process.env.PHP_BINARY || 'php', [path.join(__dirname, 'page-display-save-harness.php')], {
cwd: root, cwd: root,