Skip to content

Commit

Permalink
style: scrollbars only on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
artgpz committed May 10, 2024
1 parent c7184ab commit a849b97
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<style>
* {
box-sizing: border-box;
scrollbar-width: none;
}
</style>
</html>
3 changes: 3 additions & 0 deletions src/lib/ui/nav/nav_topics.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
border-bottom: 1px solid var(--theme-colour-4);
background-color: var(--theme-colour-1);
}
.topics-nav-centre-col:hover {
scrollbar-width: thin;
}
.topics-nav-button {
background-color: var(--theme-colour-1);
border-right: 1px solid var(--theme-colour-4);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/observer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const loadObserver = (elems: string, tracker: HTMLElement, root_el: 'theme-wrapper') => {
export const loadObserver = (elems: string, tracker: HTMLElement, root_el: string) => {
const observer = new IntersectionObserver(
(es) => {
es.forEach((e, i) => {
Expand All @@ -8,7 +8,7 @@ export const loadObserver = (elems: string, tracker: HTMLElement, root_el: 'them
})
},
{
root: document.getElementById(root_el),
root: document.getElementById(root_el ?? 'theme-wrapper'),
threshold: 0.9
}
)
Expand Down
3 changes: 3 additions & 0 deletions src/routes/[slug]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
{/if}

<style>
.slug-layout-left-col:hover {
scrollbar-width: thin;
}
.slug-layout-left-col[data-open='true'] {
border-right: 3px solid var(--theme-colour-6);
background-color: color-mix(in oklab, var(--theme-colour-4) 20%, white 90%);
Expand Down

0 comments on commit a849b97

Please sign in to comment.