Skip to content

Commit 559939f

Browse files
authored
Improve top and bottom margins of first/last content in tabpanel (#2083)
1 parent cac23f1 commit 559939f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

assets/css/tabset.css

+33
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,36 @@
7070
border-right-width: 0;
7171
}
7272
}
73+
74+
/* tabpanel content: top margin of first and bottom margin of last */
75+
@media screen and (max-width: 768px) {
76+
.tabset-panel > :is(:first-child) {
77+
&:is(table) {
78+
margin: .5em 0;
79+
}
80+
}
81+
}
82+
@media screen and (min-width: 769px) {
83+
.tabset-panel > :is(:first-child) {
84+
&:is(blockquote, .admonition) {
85+
margin-top: 1.5em;
86+
}
87+
&:is(p:has(img)) {
88+
margin-top: 1.25em;
89+
}
90+
&:is(table) {
91+
margin-top: .75em;
92+
}
93+
}
94+
.tabset-panel > :is(:last-child) {
95+
&:is(blockquote, .admonition) {
96+
margin-bottom: 1.5em;
97+
}
98+
&:is(p:not(:has(img)), ul, ol) {
99+
margin-bottom: 1.25em;
100+
}
101+
&:is(table) {
102+
margin-bottom: .75em;
103+
}
104+
}
105+
}

0 commit comments

Comments
 (0)