Skip to content

Commit

Permalink
fix(styles): adapt to light theme and prevent codeblock overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Sep 17, 2023
1 parent 58b991e commit 76bd11d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/red-dolphins-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'vitepress-plugin-tabs': patch
---

Use `--vp-c-bg` in light mode for code blocks inside tabs to have slight difference between the backgrounds.
Specify margin and border radius on code blocks inside tabs to prevent them from overflowing on smaller viewport widths.
9 changes: 9 additions & 0 deletions packages/vitepress-plugin-tabs/src/client/PluginTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,13 @@ provideTabsSingleState({ uid, selected })
.plugin-tabs--tab[aria-selected='true']::after {
background-color: var(--vp-plugin-tabs-tab-active-bar-color);
}
.plugin-tabs div[class*='language-'] {
border-radius: 8px;
margin: 16px 0;
}
:root:not(.dark) .plugin-tabs div[class*='language-'] {
background-color: var(--vp-c-bg);
}
</style>

0 comments on commit 76bd11d

Please sign in to comment.