File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,25 @@ const link = document.querySelector('head link, head style');
55
66style . textContent = `
77 code-block {
8+ position: relative;
89 margin: 1em 0;
910 display: block;
11+ font-size: 80%;
1012 font-family: Consolas, Monaco, monospace;
1113 }
14+ code-block span[slot="name"] {
15+ position: absolute;
16+ top: 0;
17+ left: 0;
18+ padding: 0 5px;
19+ color: #fff;
20+ line-height: 1.5;
21+ background: #75758a;
22+ }
23+ code-block pre,
24+ code-block code {
25+ font-family: inherit;
26+ }
1227 code-block pre {
1328 margin: 0;
1429 }
@@ -18,7 +33,10 @@ style.textContent = `
1833 font-size: 100%;
1934 overflow-x: auto;
2035 }
21- ` ;
36+ code-block[label] pre code {
37+ padding-top: 2em;
38+ }
39+ ` ;
2240
2341if ( link ) {
2442 link . before ( style ) ;
You can’t perform that action at this time.
0 commit comments