Skip to content

Commit 8d3a467

Browse files
committed
Modify inline-code style
1 parent 967bf3a commit 8d3a467

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

styles/globals.css

-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ td {
2727
border-style: dashed;
2828
}
2929

30-
code.inline-code,
31-
code.inline-verbatim {
32-
border-radius: 5px;
33-
border: 1px solid #bcbec0;
34-
padding: 2px;
35-
}
36-
3730
pre.src-block[class] {
3831
font-size: 12px;
3932
}

util/processOrg.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,21 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => {
198198
p: ({ children }) => {
199199
return <p lang="en">{children as ReactNode}</p>
200200
},
201+
code: ({ className, children }) => {
202+
if (className === 'inline-code') {
203+
return <chakra.code
204+
px={1}
205+
py={0.5}
206+
rounded="sm"
207+
fontSize="xs"
208+
color="gray.800"
209+
bgColor="gray.300"
210+
>
211+
{children as any}
212+
</chakra.code>
213+
}
214+
return children;
215+
},
201216
},
202217
})
203218
.use(rehypePrism as any, { ignoreMissing: true }),

0 commit comments

Comments
 (0)