Skip to content

Commit 9bf5e07

Browse files
committed
fix: scrollbar color in light, closes #185
Signed-off-by: Innei <[email protected]>
1 parent 4e36cad commit 9bf5e07

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

src/components/ui/markdown/renderers/LinkRenderer.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,17 @@ const GithubUrlRenderL: FC<{
196196
const ref = splitString[0]
197197
const path = ref ? splitString.slice(1).join('/') : afterTypeString
198198
return (
199-
<>
200-
<MLink href={href}>{href}</MLink>
199+
<div className="flex w-full flex-col items-center">
201200
<EmbedGithubFile
202201
owner={owner}
203202
repo={repo}
204203
path={path}
205204
refType={ref}
206205
/>
207-
</>
206+
<div className="mt-4">
207+
<MLink href={href}>{href}</MLink>
208+
</div>
209+
</div>
208210
)
209211
}
210212
}

src/components/widgets/shared/EmbedGithubFile.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const EmbedGithubFile = memo(
107107
if (!data) return null
108108

109109
return (
110-
<div className="h-[50vh] overflow-auto">
110+
<div className="h-[50vh] w-full overflow-auto">
111111
<HighLighter content={data} lang={fileType} />
112112
</div>
113113
)

src/styles/scrollbar.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ body {
2121
*::-webkit-scrollbar-thumb,
2222
*::-webkit-scrollbar-thumb:hover {
2323
background-color: transparent;
24-
border: 3px solid theme(colors.base-100);
24+
border: 3px solid theme(colors.zinc.200/20);
2525
border-radius: 5px;
2626
}
2727

2828
*::-webkit-scrollbar {
2929
width: 5px !important;
3030
height: 5px !important;
31-
background: theme(colors.base-100);
31+
background: theme(colors.zinc.100);
3232
}
3333

3434
*::-webkit-scrollbar-thumb {
@@ -40,5 +40,5 @@ body {
4040
}
4141

4242
*::-webkit-scrollbar-corner {
43-
background: theme(colors.base-100);
43+
background: theme(colors.zinc.100);
4444
}

src/styles/variables.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ html {
2525
}
2626

2727
::selection {
28-
background-color: var(--theme-color);
29-
color: theme(colors.always.white);
28+
background-color: var(--theme-color) !important;
29+
color: theme(colors.always.white) !important;
3030
text-shadow: none;
3131
}
3232

0 commit comments

Comments
 (0)