feat: add styles to hide empty aside and expand article for better layout on medium screens (#659)

This commit is contained in:
Cell
2025-11-21 16:24:07 +08:00
committed by GitHub
parent 3f809345ff
commit 2cbf7aadd4
+15
View File
@@ -40,6 +40,21 @@
}
}
@media only screen and (max-width: 1200px) and (min-width: 961px) {
.wrapper main {
// Hide empty aside and expand article when only one aside is empty
aside:first-child:empty:has(~ aside:not(:empty)),
aside:first-child:not(:empty) ~ aside#toc-auto:empty {
display: none;
}
aside:first-child:empty:has(~ aside:not(:empty)) ~ article,
aside:first-child:not(:empty) ~ article:has(~ aside:empty) {
flex: 3;
}
}
}
@media only screen and (max-width: 960px) {
%page-style {
width: ROUND(80%, 2px) !important;