I've updated the header implementation to properly handle heights and scroll margins:
Changed header height to be explicitly set using CSS variable --header-height instead of being determined by padding Set responsive header heights: Default: 100px Mobile (480px): 80px Small Mobile (320px): 60px Ensured scroll-margin-top on headings uses the same --header-height variable Main content padding-top uses the same --header-height variable These changes ensure consistent header heights across all screen sizes and proper scroll positioning for anchor links.
This commit is contained in:
@@ -20,6 +20,10 @@ body {
|
||||
will-change: background-color, color;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
scroll-margin-top: var(--header-height);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: var(--spacing-lg);
|
||||
|
||||
Reference in New Issue
Block a user