File tree Expand file tree Collapse file tree 2 files changed +30
-16
lines changed Expand file tree Collapse file tree 2 files changed +30
-16
lines changed Original file line number Diff line number Diff line change @@ -864,16 +864,28 @@ blockquote p:last-child {
864
864
}
865
865
866
866
/* Tabs */
867
- .nav-tabs {
868
- list-style : none;
869
- display : flex;
870
- justify-content : start;
871
- border-bottom : 1px solid black;
867
+
868
+ .tabs-container {
872
869
position : relative;
870
+ border-bottom : 1px solid black;
871
+ white-space : nowrap;
873
872
874
873
/* Lines extend 1rem into gutter on both sides */
875
874
width : calc (100% + 2rem );
876
875
margin-left : -1rem ;
876
+ }
877
+
878
+ .nav-tabs {
879
+ overflow-x : scroll;
880
+ overflow-y : hidden;
881
+ height : calc (100% + 1px );
882
+ scrollbar-width : none;
883
+
884
+ list-style : none;
885
+ display : flex;
886
+ justify-content : start;
887
+ margin : 0 1rem ;
888
+ padding : 0 ;
877
889
878
890
> : not (: last-child ) {
879
891
border-right : none;
@@ -910,7 +922,7 @@ blockquote p:last-child {
910
922
position : absolute;
911
923
display : block;
912
924
border-bottom : 1px solid white;
913
- bottom : -1 px ; /* Moves the line down 1px (aka the thickness of the border) */
925
+ bottom : 0 ;
914
926
left : 0 ;
915
927
width : 100% ;
916
928
z-index : 9999 ;
Original file line number Diff line number Diff line change 2
2
{{- $tab_set_id := .Get "name" | default (printf "tabset-%s-%d" (.Page.RelPermalink) (.Page.Scratch.Get "tabset-counter") ) | anchorize -}}
3
3
{{- $tabs := .Scratch.Get "tabs" -}}
4
4
{{- if .Inner -}}{{- /* We don't use the inner content, but Hugo will complain if we don't reference it. */ -}}{{- end -}}
5
- < ul class ="nav nav-tabs " id ="{{ $tab_set_id }} " role ="tablist ">
6
- {{- range $i, $e := $tabs -}}
7
- {{- $id := printf "%s-%d" $tab_set_id $i -}}
8
- {{- if (eq $i 0) -}}
9
- < li class ="nav-item "> < a data-toggle ="tab " class ="nav-link active " href ="#{{ $id }} " role ="tab " aria-controls ="{{ $id }} " aria-selected ="true "> {{- trim .name " " -}}</ a > </ li >
10
- {{ else }}
11
- < li class ="nav-item "> < a data-toggle ="tab " class ="nav-link " href ="#{{ $id }} " role ="tab " aria-controls ="{{ $id }} "> {{- trim .name " " -}}</ a > </ li >
12
- {{- end -}}
13
- {{- end -}}
14
- </ ul >
5
+ < div class ="tabs-container ">
6
+ < ul class ="nav nav-tabs " id ="{{ $tab_set_id }} " role ="tablist ">
7
+ {{- range $i, $e := $tabs -}}
8
+ {{- $id := printf "%s-%d" $tab_set_id $i -}}
9
+ {{- if (eq $i 0) -}}
10
+ < li class ="nav-item "> < a data-toggle ="tab " class ="nav-link active " href ="#{{ $id }} " role ="tab " aria-controls ="{{ $id }} " aria-selected ="true "> {{- trim .name " " -}}</ a > </ li >
11
+ {{ else }}
12
+ < li class ="nav-item "> < a data-toggle ="tab " class ="nav-link " href ="#{{ $id }} " role ="tab " aria-controls ="{{ $id }} "> {{- trim .name " " -}}</ a > </ li >
13
+ {{- end -}}
14
+ {{- end -}}
15
+ </ ul >
16
+ </ div >
15
17
< div class ="tab-content " id ="{{ $tab_set_id }} ">
16
18
{{- range $i, $e := $tabs -}}
17
19
{{- $id := printf "%s-%d" $tab_set_id $i -}}
You can’t perform that action at this time.
0 commit comments