fix(nav): cancel full fixed-nav reserve under homepage hero
body.nav-fixed pads 88px but hero only pulled up by --nav-height (60px), leaving a blank strip above the slider. Share --nav-fixed-reserve so body padding and hero margin-top cancel exactly, matching zibll slide-header.
This commit is contained in:
@@ -11,10 +11,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* CMS freeform modules only: hero as first module under nav */
|
||||
/* CMS freeform modules only: hero as first module under nav.
|
||||
* Prefer --nav-fixed-reserve when body.nav-fixed is present so the pull-up
|
||||
* matches body padding-top (88/72/60), not just the 60px bar height. */
|
||||
.home-modules > .header-components-container:first-child,
|
||||
.home-modules--fullbleed > .header-components-container:first-child {
|
||||
margin-top: calc(var(--nav-height, 60px) * -1);
|
||||
margin-top: calc(var(--nav-fixed-reserve, var(--nav-height, 60px)) * -1);
|
||||
}
|
||||
|
||||
/* Fixed homepage hero under-nav is owned by nav/base.css (body.nav-fixed). */
|
||||
@@ -41,7 +43,7 @@
|
||||
}
|
||||
|
||||
.header-components.slide-header .header-components__content.slide-text {
|
||||
padding-top: var(--nav-height, 60px);
|
||||
padding-top: var(--nav-fixed-reserve, var(--nav-height, 60px));
|
||||
}
|
||||
|
||||
/* WordPress Admin Bar 已全局禁用,无需偏移规则 */
|
||||
|
||||
Reference in New Issue
Block a user