|
|
|
@ -2,10 +2,10 @@ code {
|
|
|
|
|
margin: 0;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
padding: .25rem .5rem;
|
|
|
|
|
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-family: var(--code-font-family);
|
|
|
|
|
font-size: var(--code-font-size);
|
|
|
|
|
color: var(--c-text-light);
|
|
|
|
|
background-color: rgba(27, 31, 35, .05);
|
|
|
|
|
background-color: var(--code-inline-bg-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
code .token.deleted {
|
|
|
|
@ -18,33 +18,34 @@ code .token.inserted {
|
|
|
|
|
|
|
|
|
|
div[class*='language-'] {
|
|
|
|
|
position: relative;
|
|
|
|
|
margin: 14px 0;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
padding: .5rem 1.5rem;
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
margin: 1rem -1.5rem;
|
|
|
|
|
background-color: var(--code-bg-color);
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[class*='language-'] pre {
|
|
|
|
|
position: relative;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
background: transparent;
|
|
|
|
|
li > div[class*='language-'] {
|
|
|
|
|
border-radius: 6px 0 0 6px;
|
|
|
|
|
margin: 1rem -1.5rem 1rem -1.25rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[class*='language-'] code {
|
|
|
|
|
padding: 0;
|
|
|
|
|
color: #eee;
|
|
|
|
|
@media (min-width: 420px) {
|
|
|
|
|
div[class*='language-'] {
|
|
|
|
|
margin: 1rem 0;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[class*='language-'] code,
|
|
|
|
|
[class*='language-'] pre {
|
|
|
|
|
li > div[class*='language-'] {
|
|
|
|
|
margin: 1rem 0 1rem 0rem;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[class*='language-'] pre,
|
|
|
|
|
[class*='language-'] code {
|
|
|
|
|
text-align: left;
|
|
|
|
|
white-space: pre;
|
|
|
|
|
word-spacing: normal;
|
|
|
|
|
word-break: normal;
|
|
|
|
|
word-wrap: normal;
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
-moz-tab-size: 4;
|
|
|
|
|
-o-tab-size: 4;
|
|
|
|
|
tab-size: 4;
|
|
|
|
@ -54,17 +55,34 @@ div[class*='language-'] {
|
|
|
|
|
hyphens: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[class*='language-'] pre {
|
|
|
|
|
position: relative;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 1.25rem 1.5rem;
|
|
|
|
|
background: transparent;
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[class*='language-'] code {
|
|
|
|
|
padding: 0;
|
|
|
|
|
line-height: var(--code-line-height);
|
|
|
|
|
font-size: var(--code-font-size);
|
|
|
|
|
color: #eee;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Line highlighting */
|
|
|
|
|
|
|
|
|
|
.highlight-lines {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
padding-top: var(--code-padding-vertical);
|
|
|
|
|
padding: 1.25rem 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
line-height: var(--code-line-height);
|
|
|
|
|
font-family: var(--code-font-family);
|
|
|
|
|
font-size: var(--code-font-size);
|
|
|
|
|
user-select: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -75,21 +93,23 @@ div[class*='language-'] {
|
|
|
|
|
/* Line numbers mode */
|
|
|
|
|
|
|
|
|
|
div[class*='language-'].line-numbers-mode {
|
|
|
|
|
padding-left: 5rem;
|
|
|
|
|
padding-left: 3.5rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.line-numbers-wrapper {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
z-index: 3;
|
|
|
|
|
border-right: 1px solid rgba(0, 0, 0, .5);
|
|
|
|
|
padding: var(--code-padding-vertical) 0;
|
|
|
|
|
padding: 1.25rem 0;
|
|
|
|
|
width: 3.5rem;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
line-height: var(--code-line-height);
|
|
|
|
|
font-family: var(--code-font-family);
|
|
|
|
|
font-size: var(--code-font-size);
|
|
|
|
|
color: #888;
|
|
|
|
|
z-index: 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Language marker */
|
|
|
|
@ -98,7 +118,7 @@ div[class*='language-'].line-numbers-mode {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: .6em;
|
|
|
|
|
right: 1em;
|
|
|
|
|
z-index: 3;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
font-size: .8rem;
|
|
|
|
|
color: #888;
|
|
|
|
|
}
|
|
|
|
|