-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(landing): scrollbars hide when inactive #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,10 +39,43 @@ | |
| --ease-out: cubic-bezier(0.25, 1, 0.5, 1); | ||
| --ease-expo: cubic-bezier(0.16, 1, 0.3, 1); | ||
| --content: min(1180px, calc(100vw - 32px)); | ||
| --scrollbar-thumb: transparent; | ||
| --scrollbar-thumb-active: oklch(51% 0.045 100 / 0.42); | ||
| --scrollbar-thumb-hover: oklch(43% 0.05 100 / 0.56); | ||
| --scrollbar-track: transparent; | ||
| } | ||
|
|
||
| * { | ||
| box-sizing: border-box; | ||
| scrollbar-width: thin; | ||
| scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); | ||
| } | ||
|
|
||
| html.scrollbars-active, | ||
| :where(.agent-setup-panel, .agent-setup-panel pre):hover, | ||
| :where(.agent-setup-panel, .agent-setup-panel pre):focus-within { | ||
| --scrollbar-thumb: var(--scrollbar-thumb-active); | ||
| } | ||
|
Comment on lines
+54
to
+58
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In CSS, Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
|
|
||
| ::-webkit-scrollbar { | ||
| width: 10px; | ||
| height: 10px; | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-track { | ||
| background: var(--scrollbar-track); | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-thumb { | ||
| border: 3px solid transparent; | ||
| border-radius: 999px; | ||
| background: var(--scrollbar-thumb); | ||
| background-clip: padding-box; | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-thumb:hover { | ||
| background: var(--scrollbar-thumb-hover); | ||
| background-clip: padding-box; | ||
| } | ||
|
|
||
| html { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The anonymous arrow function passed to
window.addEventListener("keydown", ...)has no stored reference, so it cannot be passed toremoveEventListenerlater. The other four listeners all use the namedshowScrollbarsBrieflyreference and can be cleaned up. If Astro View Transitions are ever added to this page, navigating back and forth would stack up duplicate keydown listeners onwindow, causing the scrollbar to re-appear multiple times per keypress. Extracting the arrow function into a named handler (or the sameshowScrollbarsBrieflywith a guard, since all the listed keys trigger page scrolling anyway) would make cleanup straightforward.