Skip to content

Commit

Permalink
fix(theme): improve code block scrollbar, close #427 (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo authored Jan 21, 2025
1 parent 0002996 commit 0ce2754
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/plugin-md-power/src/client/components/CodeTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ function onTabNavClick(index: number): void {
border-radius: 6px 6px 0 0;
box-shadow: inset 0 -1px var(--vp-code-tab-divider);
transition: background-color var(--vp-t-color), box-shadow var(--vp-t-color);
scrollbar-width: thin;
}
@media print {
Expand Down
2 changes: 2 additions & 0 deletions theme/src/client/styles/code.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ html:not([data-theme="dark"]) .vp-code span {
overflow-x: auto;
background-color: var(--vp-code-block-bg);
transition: background-color var(--vp-t-color);

scrollbar-width: thin;
}

@media (min-width: 640px) {
Expand Down

0 comments on commit 0ce2754

Please sign in to comment.