Skip to content

Commit 90a59ec

Browse files
committed
docs: update layout
1 parent dd3c457 commit 90a59ec

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

docs/assets/scss/_component-examples.scss

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,24 @@
22
// Docs examples
33
//
44

5-
.tab-content .tab-pane .docs-code-snippet {
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+
border-top: 0;
918
@include border-top-radius(0);
19+
20+
.highlight {
21+
@include border-top-radius(0);
22+
}
1023
}
1124
}
1225

docs/layouts/shortcodes/tabs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{{ with .Inner }}{{/* don't do anything, just call it */}}{{ end }}
22
{{ $groupId := default "default" (.Get "groupId") }}
3-
<ul class="nav nav-underline-border border-1" role="tablist">
3+
<ul class="nav nav-underline-border docs-code-tabs" role="tablist">
44
{{ range $idx, $tab := .Scratch.Get "tabs" }}
55
<li class="nav-item mb-0" role="presentation">
66
<button class="nav-link {{ cond (eq $idx 0) "active" ""}}" data-coreui-toggle="tab" data-coreui-target="#{{ $groupId }}-{{ .name | urlize}}" type="button" role="tab">{{ .name }}</button>
77
</li>
88
{{ end }}
99
</ul>
10-
<div class="tab-content">
10+
<div class="tab-content docs-code-tab-content">
1111
{{ range $idx, $tab := .Scratch.Get "tabs" }}
1212
<div class="tab-pane fade {{ cond (eq $idx 0) "show active" ""}}" id="{{ $groupId }}-{{ .name | urlize}}" role="tabpanel" aria-labelledby="{{ .name }}-tab" tabindex="0">
1313
{{ .content }}

0 commit comments

Comments
 (0)