Aligns the page edges with the design and fixes the Contact anchor offset
The content column now uses the design's gutter as side padding instead of Chakra's 16/24/32px. The Lifestyle fotografie row on phones bled out by the gutter, so the page was 4px too wide and Chrome zoomed out slightly. The header drops its extra padding and the to-top button follows the gutter, so logo, hero controls and content share one edge. Anchored sections now scroll to the height of the shrunken header, so Contact lands right below it instead of 24px lower. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ export default function BackToTop() {
|
||||
data-testid="back-to-top-button"
|
||||
position="fixed"
|
||||
bottom={EDGE}
|
||||
right={`max(${EDGE}, calc((100vw - {sizes.content}) / 2 + {spacing.8}))`}
|
||||
right={`max(${EDGE}, calc((100vw - {sizes.content}) / 2 + {spacing.gutter}))`}
|
||||
zIndex="backToTop"
|
||||
display="inline-flex"
|
||||
alignItems="center"
|
||||
|
||||
@@ -32,8 +32,9 @@ export default function HomeSection({
|
||||
aria-labelledby={labelledBy}
|
||||
data-testid={testId}
|
||||
bg={tone === 'alt' ? 'paper.alt' : 'paper'}
|
||||
// An anchor target (#contact) lands below the fixed header
|
||||
scrollMarginTop={id ? 'header' : undefined}
|
||||
// An anchor target (#contact) lands right below the fixed header,
|
||||
// which has shrunk to its sticky height by the time it gets there
|
||||
scrollMarginTop={id ? 'header.sticky' : undefined}
|
||||
py={spacing === 'tight' ? 'sectionYTight' : 'sectionY'}
|
||||
>
|
||||
{width === 'full' ? (
|
||||
|
||||
@@ -58,7 +58,6 @@ export default function NavigationBar() {
|
||||
borderBottomColor={overlay('line', 'transparent')}
|
||||
// Schaduw alleen na scrollen, zoals .header--sticky in het design
|
||||
boxShadow={pastHero ? 'sm' : 'none'}
|
||||
px={{ base: 4, md: 8 }}
|
||||
transitionProperty="height, background-color, color, border-color, box-shadow"
|
||||
transitionDuration="interaction"
|
||||
transitionTimingFunction="smooth"
|
||||
|
||||
Reference in New Issue
Block a user