Skip to content

Commit

Permalink
Add Codeblock horizontal scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
Suzu-Gears committed Jul 27, 2023
1 parent 8ac414c commit 879961b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/notion-blocks/Code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const grammer =
.code {
display: block;
width: 100%;
margin-bottom: 0.6rem;
}
.code > div {
background: rgb(247, 246, 243);
Expand All @@ -103,7 +104,19 @@ const grammer =
padding: 0.8rem 2rem 2rem;
font-size: 0.9rem;
line-height: 1.2rem;
white-space: pre-wrap;
white-space: pre;
width: 100px;
min-width: 100%;
overflow-x: auto;
&::-webkit-scrollbar {
height: 10px;
}
&::-webkit-scrollbar-thumb {
background: rgb(211, 209, 203);
}
&::-webkit-scrollbar-track {
background: rgb(237, 236, 233);
}
}
.code pre.mermaid {
padding: 2rem;
Expand Down

0 comments on commit 879961b

Please sign in to comment.