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 @@ -870,17 +870,29 @@ blockquote p:last-child {
870
870
}
871
871
872
872
/* Tabs */
873
- .nav-tabs {
874
- list-style : none;
875
- display : flex;
876
- justify-content : start;
877
- border-bottom : 1px solid black;
873
+
874
+ .tabs-container {
878
875
position : relative;
879
876
z-index : -1 ;
877
+ border-bottom : 1px solid black;
878
+ white-space : nowrap;
880
879
881
880
/* Lines extend 1rem into gutter on both sides */
882
881
width : calc (100% + 2rem );
883
882
margin-left : -1rem ;
883
+ }
884
+
885
+ .nav-tabs {
886
+ overflow-x : scroll;
887
+ overflow-y : hidden;
888
+ height : calc (100% + 1px );
889
+ scrollbar-width : none;
890
+
891
+ list-style : none;
892
+ display : flex;
893
+ justify-content : start;
894
+ margin : 0 1rem ;
895
+ padding : 0 ;
884
896
885
897
> : not (: last-child ) {
886
898
border-right : none;
@@ -917,7 +929,7 @@ blockquote p:last-child {
917
929
position : absolute;
918
930
display : block;
919
931
border-bottom : 1px solid white;
920
- bottom : -1 px ; /* Moves the line down 1px (aka the thickness of the border) */
932
+ bottom : 0 ;
921
933
left : 0 ;
922
934
width : 100% ;
923
935
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