Fix tabbed styling

This commit is contained in:
Daniel_I_Am 2022-06-14 18:40:35 +02:00
parent 15d2639736
commit 54fc47e601
3 changed files with 40 additions and 3 deletions

36
assets/sass/_tabbed.scss Normal file
View File

@ -0,0 +1,36 @@
.tabbed {
background-color: rgba(black, 0.25);
border-radius: 1rem;
padding: 1rem;
.tab-header {
display: flex;
flex-direction: row;
div {
user-select: none;
cursor: pointer;
padding: 0 0.25rem;
margin: 0 0.25rem;
&:first-child {
margin-left: 0;
}
&.active {
border-bottom: 1px solid $accent-color;
}
}
}
.tab-content {
&>div {
.highlight {
pre {
background-color: transparent !important;
}
}
}
}
}

View File

@ -17,6 +17,7 @@
// Component-specific styling // Component-specific styling
@import "compact-list"; @import "compact-list";
@import "pagination"; @import "pagination";
@import "list"; @import "tabbed";
@import "code"; @import "code";
@import "copy"; @import "copy";
@import "list";

View File

@ -4,9 +4,9 @@
{{ $lines := split . "\n" }} {{ $lines := split . "\n" }}
{{ $title := index $lines 1}} {{ $title := index $lines 1}}
<span role="button" data-tab-index="{{ $index }}"> <div role="button" data-tab-index="{{ $index }}" tabindex="0">
{{ $title }} {{ $title }}
</span> </div>
{{ end }} {{ end }}
</div> </div>