Skip to content

Commit

Permalink
💄 style: hide horizontal scrollbar in codeblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Jul 8, 2023
1 parent 33cfe77 commit d7b0191
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions sass/parts/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ pre {
line-height: 1.4;
overflow-x: auto;
padding: 2rem 1rem 1rem;
-webkit-overflow-scrolling: touch;
border-radius: 5px;

code {
Expand All @@ -54,7 +53,16 @@ pre {
color: inherit;
padding: 0rem;
border: 0rem;
overflow-x: auto;
border-radius: 5px;
-webkit-overflow-scrolling: touch;

// Hide horizontal scrollbar
scrollbar-width: none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
display: none;
}

&::before {
content: attr(data-lang);
Expand All @@ -72,10 +80,6 @@ pre {
top: 0;
left: 0;
}

&[class*="language-"] {
-webkit-overflow-scrolling: touch;
}
}
}

Expand Down

0 comments on commit d7b0191

Please sign in to comment.