File tree Expand file tree Collapse file tree 2 files changed +51
-26
lines changed Expand file tree Collapse file tree 2 files changed +51
-26
lines changed Original file line number Diff line number Diff line change @@ -937,47 +937,74 @@ blockquote.side-callout {
937
937
.tabs-container {
938
938
/* border-bottom: 1px solid black; */
939
939
white-space : nowrap;
940
+ position : relative;
940
941
941
- /* Lines extend 1rem into gutter on both sides */
942
- width : calc (100% + 2rem );
943
- margin-left : -1rem ;
944
-
945
- display : flex;
946
- flex-direction : row;
947
- align-items : end;
948
-
949
- * {
950
- flex-grow : 0 ;
951
- }
952
-
953
- & > : last-child {
954
- /* Extend the last child */
955
- flex-grow : 1 ;
942
+ & ::after {
943
+ content : "" ;
944
+ position : absolute;
945
+ display : block;
946
+ border-bottom : 1px solid black;
947
+ bottom : 0 ;
948
+ right : 0 ;
949
+ width : 2rem ;
956
950
}
957
951
}
958
952
959
- .tabs-line {
960
- display : block;
961
- background-color : white;
962
- border-bottom : 1px solid black;
963
- width : 2rem ;
964
- }
965
-
966
953
.nav-tabs {
967
954
overflow-x : scroll;
968
955
overflow-y : hidden;
969
- height : calc ( 100% + 1 px ) ;
956
+ height : 100% ;
970
957
scrollbar-width : none;
971
958
972
959
list-style : none;
973
960
display : flex;
974
961
justify-content : start;
975
962
margin : 0 ;
976
- padding : 0 ;
963
+ padding : 0 2rem ;
964
+ position : relative;
977
965
978
966
> : not (: last-child ) {
979
967
border-right : none;
980
968
}
969
+
970
+ & ::before {
971
+ content : "" ;
972
+ position : absolute;
973
+ display : block;
974
+ border-bottom : 1px solid black;
975
+ bottom : 0 ;
976
+ left : 0 ;
977
+ width : 2rem ;
978
+ }
979
+
980
+ & ::after {
981
+ content : "" ;
982
+ position : relative;
983
+ display : block;
984
+ border-bottom : 1px solid black;
985
+ bottom : 0 ;
986
+ left : 0 ;
987
+ width : 100% ;
988
+ }
989
+
990
+ --scrollbar-width : 1px ;
991
+ --mask-height : 32px ;
992
+ --mask-image-content : linear-gradient (
993
+ to right,
994
+ transparent,
995
+ black var (--mask-height ),
996
+ black calc (100% - var (--mask-height )),
997
+ transparent
998
+ );
999
+
1000
+ --mask-size-content : 100% calc (100% - var (--scrollbar-width ));
1001
+
1002
+ --mask-image-scrollbar : linear-gradient (black, black);
1003
+ --mask-size-scrollbar : 100% var (--scrollbar-width );
1004
+ mask-image : var (--mask-image-content ), var (--mask-image-scrollbar );
1005
+ mask-size : var (--mask-size-content ), var (--mask-size-scrollbar );
1006
+ mask-position : 0 0 , 0 100% ;
1007
+ mask-repeat : no-repeat, no-repeat;
981
1008
}
982
1009
983
1010
.nav-item {
Original file line number Diff line number Diff line change 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
5
< div class ="tabs-container ">
6
- < span class ="tabs-line "> </ span >
7
6
< ul class ="nav nav-tabs " id ="{{ $tab_set_id }} " role ="tablist ">
8
7
{{- range $i, $e := $tabs -}}
9
8
{{- $id := printf "%s-%d" $tab_set_id $i -}}
14
13
{{- end -}}
15
14
{{- end -}}
16
15
</ ul >
17
- < span class ="tabs-line "> </ span >
18
16
</ div >
19
17
< div class ="tab-content " id ="{{ $tab_set_id }} ">
20
18
{{- range $i, $e := $tabs -}}
You can’t perform that action at this time.
0 commit comments