perf: 调整内容容器中代码块在移动设备 UI

This commit is contained in:
pengzhanbo 2024-01-08 00:51:14 +08:00
parent 6b5fd5d427
commit 3e5ecada8e
2 changed files with 17 additions and 14 deletions

View File

@ -203,10 +203,6 @@ div[class*="language-"] {
opacity: 1;
}
.code-tabs-nav {
margin-bottom: 0;
}
// narrow mobile
@media (max-width: 419px) {
.plume-content {
@ -214,13 +210,5 @@ div[class*="language-"] {
margin: 0.85rem -1.5rem;
border-radius: 0;
}
.hint-container div[class*="language-"] {
margin: 0.85rem -1rem 0.85rem -1.25rem;
}
}
.plume-content .vp-code-tabs-nav {
margin: 0 -1.5rem -0.85rem;
}
}

View File

@ -1,3 +1,4 @@
/* stylelint-disable order/order */
/* stylelint-disable no-descending-specificity */
/* ------------------ Markdown Enhance: Hint Container ------------------ */
@ -38,6 +39,12 @@
background-color: transparent;
}
@media (max-width: 419px) {
div[class*="language-"] {
margin: 0.85rem -0.75rem 0.85rem -1rem;
}
}
&.note {
color: var(--vp-c-text-3);
border-radius: 0;
@ -129,9 +136,19 @@
/* ------------------ Markdown Enhance: Code Tabs ----------------------- */
.plume-content {
.code-tabs-nav {
margin-bottom: 0;
}
.vp-code-tabs-nav {
margin: 0.85rem 0 0;
}
@media (max-width: 419px) {
.vp-code-tabs-nav {
margin: 0 -1.5rem -0.85rem;
}
}
}
/* -------------------- Markdown Enhance: Code Demo -------------------- */
@ -200,7 +217,6 @@
}
}
/* stylelint-disable-next-line order/order */
@media (max-width: 419px) {
.vp-code-demo {
margin: 8px -12px;
@ -258,7 +274,6 @@
border: 1px solid var(--vp-c-divider);
}
/* stylelint-disable-next-line order/order */
@media (min-width: 419px) {
.vp-tabs {
margin: 1.5rem 0;