Skip to content

Commit 8aaa6d2

Browse files
authored
Merge pull request #144 from IksRain/CodeCpmpare-Fix
调整CodeCompare自适应布局
2 parents cde752d + cfd8816 commit 8aaa6d2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/.vitepress/theme/components/CodeCompare.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ defineProps({
6969
border: 1px solid var(--vp-c-divider);
7070
background-color: var(--vp-c-bg-soft);
7171
height: 100%;
72+
display: flex;
73+
flex-direction: column;
7274
}
7375
7476
.pane-header {
@@ -92,9 +94,15 @@ defineProps({
9294
color: #349d6e;
9395
}
9496
97+
.pane-content{
98+
flex: 100%;
99+
display: flex;
100+
}
95101
/* 调整插槽内代码块的 margin,使其贴合容器 */
96102
.pane-content :deep(div[class*='language-']) {
97103
margin: 0 !important;
98104
border-radius: 0 !important;
105+
display: flex;
106+
flex: 100%;
99107
}
100108
</style>

0 commit comments

Comments
 (0)