Skip to content

Commit

Permalink
fix: scrollbar color in light, closes #185
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Dec 13, 2023
1 parent 4e36cad commit 9bf5e07
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions src/components/ui/markdown/renderers/LinkRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,17 @@ const GithubUrlRenderL: FC<{
const ref = splitString[0]
const path = ref ? splitString.slice(1).join('/') : afterTypeString
return (
<>
<MLink href={href}>{href}</MLink>
<div className="flex w-full flex-col items-center">
<EmbedGithubFile
owner={owner}
repo={repo}
path={path}
refType={ref}
/>
</>
<div className="mt-4">
<MLink href={href}>{href}</MLink>
</div>
</div>
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/shared/EmbedGithubFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const EmbedGithubFile = memo(
if (!data) return null

return (
<div className="h-[50vh] overflow-auto">
<div className="h-[50vh] w-full overflow-auto">
<HighLighter content={data} lang={fileType} />
</div>
)
Expand Down
6 changes: 3 additions & 3 deletions src/styles/scrollbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ body {
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb:hover {
background-color: transparent;
border: 3px solid theme(colors.base-100);
border: 3px solid theme(colors.zinc.200/20);
border-radius: 5px;
}

*::-webkit-scrollbar {
width: 5px !important;
height: 5px !important;
background: theme(colors.base-100);
background: theme(colors.zinc.100);
}

*::-webkit-scrollbar-thumb {
Expand All @@ -40,5 +40,5 @@ body {
}

*::-webkit-scrollbar-corner {
background: theme(colors.base-100);
background: theme(colors.zinc.100);
}
4 changes: 2 additions & 2 deletions src/styles/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ html {
}

::selection {
background-color: var(--theme-color);
color: theme(colors.always.white);
background-color: var(--theme-color) !important;
color: theme(colors.always.white) !important;
text-shadow: none;
}

Expand Down

0 comments on commit 9bf5e07

Please sign in to comment.