mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 17:31:02 +08:00
178 lines
3.7 KiB
SCSS
178 lines
3.7 KiB
SCSS
/* https://github.com/antfu/prism-theme-vars */
|
|
@use 'prism-theme-vars/base.css';
|
|
@use 'prism-theme-vars/marker.css';
|
|
|
|
[class*='language-']:before {
|
|
font-family: var(--code-font-family);
|
|
}
|
|
|
|
span[class~='language-css']:before {
|
|
content: '';
|
|
}
|
|
|
|
:root {
|
|
--prism-marker-opacity: 0.6;
|
|
--prism-marker-color: var(--code-text-color);
|
|
--prism-line-height: var(--code-line-height);
|
|
}
|
|
|
|
html:not(.dark) {
|
|
--prism-builtin: #3182bd;
|
|
--prism-comment: #848486;
|
|
--prism-deleted: #3182bd;
|
|
--prism-function: #6196cc;
|
|
--prism-boolean: #c25205;
|
|
--prism-number: #c25205;
|
|
--prism-property: #717c11;
|
|
--prism-punctuation: #a8a9cc;
|
|
--prism-keyword: #c792ea;
|
|
--prism-variable: #0b8235;
|
|
--prism-url-decoration: #67cdcc;
|
|
--prism-symbol: green;
|
|
--prism-selector: #0b8235;
|
|
}
|
|
|
|
html.dark {
|
|
--prism-scheme: dark;
|
|
--prism-foreground: #a6accd;
|
|
--prism-background: #181818;
|
|
--prism-comment: #758575;
|
|
--prism-string: #c3e88d;
|
|
--prism-literal: #429988;
|
|
--prism-keyword: #89ddff;
|
|
--prism-boolean: #6394bf;
|
|
--prism-number: #6394bf;
|
|
--prism-variable: #c2b36e;
|
|
--prism-function: #82aaff;
|
|
--prism-deleted: #bc6066;
|
|
--prism-class: #54b1bf;
|
|
--prism-builtin: var(--el-color-primary-light-3);
|
|
--prism-property: #c792ea;
|
|
--prism-namespace: #db889a;
|
|
--prism-punctuation: #89ddff;
|
|
--prism-decorator: #bd8f8f;
|
|
--prism-regex: #ab5e3f;
|
|
--prism-json-property: #6b8b9e;
|
|
--prism-line-number: #888888;
|
|
--prism-line-number-gutter: #eeeeee;
|
|
--prism-line-highlight-background: #444444;
|
|
--prism-selection-background: #444444;
|
|
--prism-inline-background: #2d2d2d;
|
|
}
|
|
|
|
code {
|
|
margin: 0;
|
|
border-radius: 4px;
|
|
padding: 0.15rem 0.5rem;
|
|
font-family: var(--code-font-family);
|
|
font-size: var(--code-font-size);
|
|
color: var(--code-text-color);
|
|
background-color: var(--code-bg-color);
|
|
line-height: var(--code-line-height);
|
|
}
|
|
|
|
a > code {
|
|
color: var(--code-link-color);
|
|
}
|
|
|
|
code .token.deleted {
|
|
color: #ec5975;
|
|
}
|
|
|
|
code .token.inserted {
|
|
color: var(--c-brand);
|
|
}
|
|
|
|
div[class*='language-'] {
|
|
position: relative;
|
|
margin: 1rem -1.5rem;
|
|
background-color: var(--code-bg-color);
|
|
overflow-x: auto;
|
|
}
|
|
|
|
li > div[class*='language-'] {
|
|
border-radius: 6px 0 0 6px;
|
|
margin: 1rem -1.5rem 1rem -1.25rem;
|
|
}
|
|
|
|
@media (min-width: 420px) {
|
|
div[class*='language-'] {
|
|
margin: 1rem 0;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
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;
|
|
tab-size: 4;
|
|
hyphens: none;
|
|
}
|
|
|
|
[class*='language-'] pre {
|
|
position: relative;
|
|
z-index: 1;
|
|
margin: 0;
|
|
padding: 0.25rem;
|
|
background: transparent;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
[class*='language-'] code {
|
|
padding: 0;
|
|
line-height: var(--code-line-height);
|
|
font-size: var(--code-font-size);
|
|
color: var(--code-text-color);
|
|
}
|
|
|
|
/* Line highlighting */
|
|
|
|
.highlight-lines {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
padding: 1.25rem 0;
|
|
width: 100%;
|
|
line-height: var(--code-line-height);
|
|
font-family: var(--code-font-family);
|
|
font-size: var(--code-font-size);
|
|
user-select: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.highlight-lines .highlighted {
|
|
background-color: rgba(0, 0, 0, 0.66);
|
|
}
|
|
|
|
/* Line numbers mode */
|
|
|
|
div[class*='language-'].line-numbers-mode {
|
|
padding-left: 3.5rem;
|
|
}
|
|
|
|
.line-numbers-wrapper {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
z-index: 3;
|
|
border-right: 1px solid var(--el-overlay-color-lighter);
|
|
padding: 1.25rem 0;
|
|
width: 3.5rem;
|
|
text-align: center;
|
|
line-height: var(--code-line-height);
|
|
font-family: var(--code-font-family);
|
|
font-size: var(--code-font-size);
|
|
color: #888;
|
|
}
|