Files
cv-site/static/css/01-foundation/_reset.css
T
juanatsap 4a02c0a328 fix: Restore sticky action bar by using overflow-x: clip instead of hidden
Root cause: overflow-x: hidden on html/body elements breaks position: sticky
on descendant elements. This is a known CSS behavior.

Changes:
- _reset.css: Changed overflow-x from 'hidden' to 'clip' on html and body
  - 'clip' prevents horizontal scrolling WITHOUT breaking sticky positioning
- index.html: Restored hyperscript scroll handlers (initScrollBehavior, handleScroll)
- main.js: Disabled JavaScript scroll fallback in favor of hyperscript

Behavior:
- Desktop: Action bar hides on scroll down, reappears on scroll up
- Mobile (≤900px): Action bar stays visible at all times (CSS override)

Tested: Both desktop and mobile scroll behaviors work correctly
2025-11-30 04:35:16 +00:00

46 lines
1.5 KiB
CSS

/* ============================================================================
CSS RESET - Normalize & Base Styles
============================================================================ */
/* Box sizing reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Body base */
body {
background-color: var(--page-bg);
/* OLD PATTERN - Keep for reference (can be restored anytime) */
/* background-image:
linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
linear-gradient(180deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
linear-gradient(180deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px; */
/* NEW TEST PATTERNS - Theme-specific (woven fabric for light, diagonal grid for dark) */
background-image: var(--page-bg-pattern);
background-size: 40px 40px; /* For dark theme diagonal grid */
background-attachment: fixed;
max-width: 100vw; /* Prevent horizontal overflow */
overflow-x: clip; /* Clip prevents horizontal scroll WITHOUT breaking position: sticky */
}
/* Smooth scrolling */
html {
scroll-behavior: smooth;
scroll-padding-top: 70px; /* Account for fixed header */
max-width: 100vw; /* Prevent horizontal overflow */
overflow-x: clip; /* Clip prevents horizontal scroll WITHOUT breaking position: sticky */
}
/* Ensure Iconify icons display properly */
.iconify,
iconify-icon {
display: inline-block;
vertical-align: middle;
}