1616 --playground-code-font-size : var (--__code-block-font-size );
1717 --playground-code-background : var (--md-sys-color-surface-variant );
1818 --playground-code-default-color : var (--md-sys-color-on-surface-variant );
19- --playground-code-font-family : 'Google Sans Mono' , Menlo, Monaco, "Courier New" , monospace;
19+ --playground-code-font-family : 'Google Sans Mono' , Menlo, Monaco,
20+ 'Courier New' , monospace;
2021 --playground-code-callee-color : var (--md-sys-color-primary );
2122 --playground-code-comment-color : var (--md-sys-color-on-surface-dim );
2223 --playground-code-operator-color : var (--md-sys-color-on-surface );
3536 --playground-code-linenumber-color : var (--md-sys-color-outline );
3637 --playground-code-qualifier-color : var (--md-sys-color-tertiary );
3738 --playground-code-cursor-color : var (--md-sys-color-on-surface-variant );
38- --playground-preview-toolbar-background : var (--md-sys-color-surface-container-high );
39+ --playground-preview-toolbar-background : var (
40+ --md-sys-color-surface-container-high
41+ );
3942 --playground-preview-toolbar-foreground-color : var (--md-sys-color-on-surface );
43+
44+ /* perfect circle of one line is (padding-block * 2 + (line-height: 1.5x font size)) / 2 */
45+ --catalog-code-block-border-radius : calc (
46+ (2 * var (--__code-block-font-size ) + 1.5 * var (--__code-block-font-size )) /
47+ 2
48+ );
4049}
4150
4251/* Formats the code boxes themselves */
4352.example playground-file-editor ,
44- pre [class *= " language-" ] {
53+ pre [class *= ' language-' ] {
4554 padding : var (--__code-block-font-size );
4655 /* Remove the extra hard coded 3px from line number padding. */
4756 padding-inline-start : calc (var (--__code-block-font-size ) - 3px );
48- /* perfect circle of one line is (padding * 2 + (line-height: 1.5x font size)) / 2 */
49- border-radius : calc ((2 * var (--__code-block-font-size ) + 1.5 * var (--__code-block-font-size ))/ 2 );
57+ border-radius : var (--catalog-code-block-border-radius );
5058}
5159
5260playground-file-editor {
@@ -56,11 +64,11 @@ playground-file-editor {
5664}
5765
5866code ,
59- code [class *= " language-" ],
60- pre [class *= " language-" ] {
67+ code [class *= ' language-' ],
68+ pre [class *= ' language-' ] {
6169 color : var (--md-sys-color-on-surface-variant );
6270 text-shadow : 0 1px 1px var (--md-sys-color-surface );
63- font-family : 'Google Sans Mono' , Menlo, Monaco, " Courier New" , monospace;
71+ font-family : 'Google Sans Mono' , Menlo, Monaco, ' Courier New' , monospace;
6472 direction : ltr;
6573 text-align : left;
6674 word-spacing : normal;
@@ -74,20 +82,20 @@ pre[class*="language-"] {
7482 hyphens : none;
7583}
7684
77- pre [class *= " language-" ],
78- : not (pre )> code [class *= " language-" ] {
85+ pre [class *= ' language-' ],
86+ : not (pre) > code [class *= ' language-' ] {
7987 background : var (--md-sys-color-surface-container );
8088 border : 1px solid var (--md-sys-color-outline );
8189}
8290
8391/* Code blocks */
84- pre [class *= " language-" ] {
92+ pre [class *= ' language-' ] {
8593 overflow : auto;
8694 scrollbar-width : none;
8795}
8896
8997/* Inline code */
90- : not (pre )> code [class *= " language-" ] {
98+ : not (pre) > code[class *= ' language-' ] {
9199 padding : 5px 10px ;
92100 line-height : 1 ;
93101 border-radius : 3px ;
@@ -107,7 +115,7 @@ pre[class*="language-"] {
107115}
108116
109117.token .namespace {
110- opacity : .7 ;
118+ opacity : 0 .7 ;
111119}
112120
113121.token .tag ,
@@ -147,4 +155,4 @@ pre[class*="language-"] {
147155.token .important ,
148156.token .deliminator {
149157 color : var (--md-sys-color-error );
150- }
158+ }
0 commit comments