22 margin : 0 ;
33 border-radius : 3px ;
44 padding : .25rem .5rem ;
5- font-family : source- code-pro , Menlo , Monaco , Consolas , "Courier New" , monospace ;
6- font-size : 14 px ;
5+ font-family : var ( -- code-font-family ) ;
6+ font-size : var ( --code-font-size ) ;
77 color : var (--c-text-light );
8- background-color : rgba ( 27 , 31 , 35 , .05 );
8+ background-color : var ( --code-inline-bg-color );
99}
1010
1111code .token .deleted {
@@ -18,33 +18,34 @@ code .token.inserted {
1818
1919div [class *= 'language-' ] {
2020 position : relative;
21- margin : 14px 0 ;
22- border-radius : 6px ;
23- padding : .5rem 1.5rem ;
24- line-height : 24px ;
21+ margin : 1rem -1.5rem ;
2522 background-color : var (--code-bg-color );
26- overflow-x : auto;
2723}
2824
29- [class *= 'language-' ] pre {
30- position : relative;
31- z-index : 1 ;
32- background : transparent;
25+ li > div [class *= 'language-' ] {
26+ border-radius : 6px 0 0 6px ;
27+ margin : 1rem -1.5rem 1rem -1.25rem ;
3328}
3429
35- [class *= 'language-' ] code {
36- padding : 0 ;
37- color : # eee ;
30+ @media (min-width : 420px ) {
31+ div [class *= 'language-' ] {
32+ margin : 1rem 0 ;
33+ border-radius : 6px ;
34+ }
35+
36+ li > div [class *= 'language-' ] {
37+ margin : 1rem 0 1rem 0rem ;
38+ border-radius : 6px ;
39+ }
3840}
3941
40- [class *= 'language-' ] code ,
41- [class *= 'language-' ] pre {
42+ [class *= 'language-' ] pre ,
43+ [class *= 'language-' ] code {
4244 text-align : left;
4345 white-space : pre;
4446 word-spacing : normal;
4547 word-break : normal;
4648 word-wrap : normal;
47- line-height : 24px ;
4849 -moz-tab-size : 4 ;
4950 -o-tab-size : 4 ;
5051 tab-size : 4 ;
@@ -54,17 +55,34 @@ div[class*='language-'] {
5455 hyphens : none;
5556}
5657
58+ [class *= 'language-' ] pre {
59+ position : relative;
60+ z-index : 1 ;
61+ margin : 0 ;
62+ padding : 1.25rem 1.5rem ;
63+ background : transparent;
64+ overflow-x : auto;
65+ }
66+
67+ [class *= 'language-' ] code {
68+ padding : 0 ;
69+ line-height : var (--code-line-height );
70+ font-size : var (--code-font-size );
71+ color : # eee ;
72+ }
73+
5774/* Line highlighting */
5875
5976.highlight-lines {
6077 position : absolute;
6178 top : 0 ;
79+ bottom : 0 ;
6280 left : 0 ;
63- padding-top : var ( --code-padding-vertical ) ;
81+ padding : 1.25 rem 0 ;
6482 width : 100% ;
65- line-height : 24 px ;
66- font-family : source- code-pro , Menlo , Monaco , Consolas , "Courier New" , monospace ;
67- font-size : 14 px ;
83+ line-height : var ( --code-line-height ) ;
84+ font-family : var ( -- code-font-family ) ;
85+ font-size : var ( --code-font-size ) ;
6886 user-select : none;
6987}
7088
@@ -75,21 +93,23 @@ div[class*='language-'] {
7593/* Line numbers mode */
7694
7795div [class *= 'language-' ].line-numbers-mode {
78- padding-left : 5rem ;
96+ padding-left : 3. 5rem ;
7997}
8098
8199.line-numbers-wrapper {
82100 position : absolute;
83101 top : 0 ;
102+ bottom : 0 ;
84103 left : 0 ;
104+ z-index : 3 ;
85105 border-right : 1px solid rgba (0 , 0 , 0 , .5 );
86- padding : var ( --code-padding-vertical ) 0 ;
106+ padding : 1.25 rem 0 ;
87107 width : 3.5rem ;
88108 text-align : center;
89- line-height : 24px ;
90- font-size : 16px ;
109+ line-height : var (--code-line-height );
110+ font-family : var (--code-font-family );
111+ font-size : var (--code-font-size );
91112 color : # 888 ;
92- z-index : 4 ;
93113}
94114
95115/* Language marker */
@@ -98,7 +118,7 @@ div[class*='language-'].line-numbers-mode {
98118 position : absolute;
99119 top : .6em ;
100120 right : 1em ;
101- z-index : 3 ;
121+ z-index : 2 ;
102122 font-size : .8rem ;
103123 color : # 888 ;
104124}
0 commit comments