@@ -1009,8 +1009,11 @@ blockquote.side-callout {
10091009 }
10101010}
10111011
1012- .code-block {
1012+ .code-container {
10131013 grid-column : 1 ;
1014+ display : flex;
1015+ flex-direction : row;
1016+ position : relative;
10141017}
10151018
10161019.code-block .code-header : not (: has (.code-type )) {
@@ -1023,40 +1026,18 @@ li .code-block {
10231026 margin-left : -1rem ;
10241027}
10251028
1026- .icon-code-copy {
1027- background-color : # f2f2f2 ;
1028- border : none;
1029- padding : 5px 10px ;
1030- cursor : pointer;
1031- font-family : "JetBrains Mono" , monospace;
1032- font-size : 12px ;
1033- color : # 000 ;
1034- }
1035-
10361029.highlight-v2 {
1037- margin : 0 0 1rem 0 ;
10381030 border-top : 1px solid # cccccc ;
10391031 border-bottom : 1px solid # cccccc ;
10401032 overflow-x : scroll;
10411033 scrollbar-width : none;
10421034 width : calc (100% + var (--overflow-gutter-extension ));
1043-
1044- background-image : linear-gradient (to right, white, white),
1045- linear-gradient (to right, white, white),
1046- linear-gradient (to right, rgba (165 , 165 , 165 , 0.25 ), rgba (255 , 255 , 255 , 0 )),
1047- linear-gradient (to left, rgba (165 , 165 , 165 , 0.25 ), rgba (255 , 255 , 255 , 0 ));
1048- background-position : left center, right center, left center, right center;
1049- background-repeat : no-repeat;
1050- background-size : 12px 100% , 12px 100% , 10px 100% , 10px 100% ;
1051- background-attachment : local, local, scroll, scroll;
10521035}
10531036
10541037.highlight-v2 .single-line {
10551038 display : flex;
10561039 align-items : center;
10571040 border : 1px solid # cccccc ;
1058- overflow-x : scroll;
1059- width : calc (100% + var (--overflow-gutter-extension ));
10601041}
10611042
10621043.code-header {
@@ -1070,12 +1051,18 @@ li .code-block {
10701051
10711052.code-type {
10721053 text-transform : uppercase;
1073- border : 1px solid # cccccc ;
1074- border-bottom : 1px solid white;
1075- padding : .25rem 1rem ; /* Padding for button content */
1054+ padding : .25rem 0.25rem ; /* Padding for button content */
10761055 font-size : 12px ; /* Font size */
10771056 z-index : 9999 ;
1078- margin-bottom : -1px ;
1057+ position : absolute;
1058+ background-color : white;
1059+ margin : -12px 0 0 1rem ;
1060+ }
1061+
1062+ .code-container : hover {
1063+ .code-copy-button {
1064+ display : block;
1065+ }
10791066}
10801067
10811068.code-copy-button {
@@ -1086,6 +1073,14 @@ li .code-block {
10861073 font-family : "JetBrains Mono" , monospace;
10871074 font-size : 12px ;
10881075 color : # 000 ;
1076+ order : 2 ;
1077+ display : none;
1078+ }
1079+
1080+ .code-copy-button {
1081+ position : absolute;
1082+ right : 8px ;
1083+ margin-top : 8px ;
10891084}
10901085
10911086.code-copy-button : hover {
0 commit comments