Skip to content

Commit 57912a0

Browse files
authored
style(theme/Tabs): add default padding to tab panels and support nested tabs (#3217)
1 parent 237910d commit 57912a0

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

packages/core/src/theme/components/Tabs/index.scss

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,8 @@
55
border: var(--rp-code-block-border);
66
box-shadow: var(--rp-code-block-shadow);
77

8-
// nested
9-
& & {
10-
border-radius: 0;
11-
margin: 0;
12-
border: none;
13-
}
14-
15-
.rp-codeblock {
16-
margin: 0;
17-
border-radius: 0;
18-
border: none;
19-
20-
.rp-codeblock__title {
21-
padding: 8px 12px;
22-
}
8+
.rp-codeblock__title {
9+
padding: 8px 12px;
2310
}
2411

2512
&__label {
@@ -76,6 +63,17 @@
7663

7764
&__content {
7865
&__item {
66+
padding: 0 1rem;
67+
68+
// nested rp-tabs and codeblock
69+
& > .rp-codeblock:only-child,
70+
& > .rp-tabs:only-child {
71+
margin: 0 -1rem;
72+
border-radius: 0;
73+
border: none;
74+
box-shadow: none;
75+
}
76+
7977
&--active {
8078
display: block;
8179
}

0 commit comments

Comments
 (0)