Skip to content

Commit 56e3363

Browse files
Copilotaih
andauthored
fix(mobile): ensure header stays fixed across all pages (#52)
* Initial plan * fix(mobile): ensure header stays fixed on all pages Add !important to position: sticky and top: 0 in mobile breakpoint to prevent any CSS specificity issues that could cause the header to lose its fixed positioning when navigating between chapters. docs(agent): mandate conventional commits in instructions Co-authored-by: aih <217356+aih@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aih <217356+aih@users.noreply.github.com>
1 parent 9c75e25 commit 56e3363

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/copilot-instructions.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ The application is deployed on Vercel. Configuration is in `CompendiumUI/vercel.
109109
- **CSS**: USWDS design system patterns
110110
- **Python**: Standard Python conventions, no linter configured
111111
- **Comments**: Minimal; code should be self-explanatory
112-
- **Commit Messages**: Use conventional commit messages
112+
- **Commit Messages**: **MUST** use [Conventional Commits](https://www.conventionalcommits.org/) format for all commits:
113+
- Format: `<type>(<scope>): <subject>`
114+
- Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
115+
- Example: `fix(mobile): ensure header stays fixed on scroll`
116+
- Example: `docs: update README with new installation steps`
113117
- **File Naming**:
114118
- XHTML chapters: `ch{number}-{title}.html` (e.g., `ch200-copyrightability.html`)
115119
- Python scripts: lowercase with underscores

CompendiumUI/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,8 @@ button:focus,
10751075
.header {
10761076
grid-column: 1 / -1;
10771077
grid-row: 1;
1078-
position: sticky; /* Make header sticky on mobile */
1079-
top: 0; /* Stick to top of viewport */
1078+
position: sticky !important; /* Make header sticky on mobile - important to prevent override */
1079+
top: 0 !important; /* Stick to top of viewport */
10801080
z-index: 100; /* Ensure header stays above other content */
10811081
}
10821082

0 commit comments

Comments
 (0)