Skip to content

Commit ded2c0c

Browse files
committed
docs: improve responsive layout
1 parent ba42bcb commit ded2c0c

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

packages/docs/src/styles/_component-examples.scss

+17-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,25 @@
22
// Docs examples
33
//
44

5-
.tab-content .tab-pane {
6-
@include border-top-radius(0);
5+
.docs-code-tabs {
6+
padding: 0 ($cd-gutter-x * .5);
7+
margin: 0 ($cd-gutter-x * -.5);
78

8-
.highlight {
9+
@include media-breakpoint-up(md) {
10+
padding: 0;
11+
margin: 0;
12+
}
13+
}
14+
15+
.docs-code-tab-content {
16+
.tab-pane > .docs-code-snippet,
17+
.tab-pane > .highlight {
18+
border-top: 0;
919
@include border-top-radius(0);
20+
21+
.highlight {
22+
@include border-top-radius(0);
23+
}
1024
}
1125
}
1226

packages/remark-code-tabs/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ function createTabs(tabNodes, { labels }) {
144144
children: [
145145
{
146146
attributes: [
147+
{ name: 'className', type: 'mdxJsxAttribute', value: 'docs-code-tabs' },
147148
{
148149
name: 'variant',
149150
type: 'mdxJsxAttribute',
@@ -155,7 +156,9 @@ function createTabs(tabNodes, { labels }) {
155156
type: 'mdxJsxFlowElement',
156157
},
157158
{
158-
attributes: [{ name: 'className', type: 'mdxJsxAttribute', value: 'mb-3' }],
159+
attributes: [
160+
{ name: 'className', type: 'mdxJsxAttribute', value: 'docs-code-tab-content mb-3' },
161+
],
159162
children: tabContentChildren,
160163
name: 'CTabContent',
161164
type: 'mdxJsxFlowElement',

0 commit comments

Comments
 (0)