Skip to content

Commit

Permalink
fix(docs): hide scrollbar in codehike
Browse files Browse the repository at this point in the history
  • Loading branch information
gwansikk committed Dec 15, 2024
1 parent 4e0c7d5 commit d41bb76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/suspensive.org/src/components/Scrollycoding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function Scrollycoding(props: unknown) {
return (
<>
{/* only in desktop */}
<SelectionProvider className="my-4 mb-24 hidden gap-4 md:flex">
<SelectionProvider className="scrollbar-none my-4 mb-24 hidden gap-4 md:flex">
<div className="mb-[40vh]" style={{ flex: 1 }}>
{steps.map((step, i) => (
<Selectable
Expand All @@ -92,7 +92,7 @@ export function Scrollycoding(props: unknown) {
className="rounded-xl border-2 border-[#ffffff10] bg-[#191919]"
style={{ flex: 2 }}
>
<div className="sticky top-16 overflow-auto">
<div className="scrollbar-none sticky top-16 overflow-auto">
<Selection
from={steps.map((step) => (
<Code
Expand Down Expand Up @@ -121,7 +121,7 @@ export function Scrollycoding(props: unknown) {
))}
</div>
<div className="-mr-6 rounded-xl" style={{ flex: 2 }}>
<div className="sticky top-28 overflow-auto">
<div className="scrollbar-none sticky top-28 overflow-auto">
<Selection
from={steps.map((step) => (
<CodeMobile
Expand Down
8 changes: 8 additions & 0 deletions docs/suspensive.org/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

.scrollbar-none {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
.scrollbar-none::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera*/
}

0 comments on commit d41bb76

Please sign in to comment.