mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 03:18:54 +08:00
313 lines
4.7 KiB
SCSS
Vendored
313 lines
4.7 KiB
SCSS
Vendored
p > code,
|
|
li > code,
|
|
strong > code,
|
|
em > code {
|
|
padding: 2px 4px;
|
|
background: var(--inline-code-bg);
|
|
white-space: pre-wrap;
|
|
color: var(--primary);
|
|
}
|
|
|
|
a > code {
|
|
padding: 2px 4px;
|
|
background: var(--inline-code-bg);
|
|
white-space: pre-wrap;
|
|
color: var(--tertiary);
|
|
}
|
|
|
|
code {
|
|
color: var(--primary-very-high);
|
|
background: var(--hljs-bg);
|
|
border-radius: var(--d-border-radius);
|
|
font-size: 14px;
|
|
line-height: calc((13 + 4) / 13);
|
|
}
|
|
|
|
pre > code {
|
|
display: block;
|
|
padding: 12px;
|
|
max-height: 500px;
|
|
}
|
|
|
|
h1 code,
|
|
h2 code,
|
|
h3 code,
|
|
h4 code,
|
|
h5 code,
|
|
h6 code {
|
|
font-size: inherit;
|
|
}
|
|
|
|
.hljs-comment,
|
|
.hljs-doctag,
|
|
.hljs-code,
|
|
.hljs-meta {
|
|
color: var(--hljs-comment);
|
|
font-style: italic;
|
|
}
|
|
|
|
.hljs-color {
|
|
color: var(--hljs-color);
|
|
}
|
|
|
|
.hljs-keyword,
|
|
.hljs-subst,
|
|
.hljs-request,
|
|
.hljs-status {
|
|
color: var(--hljs-keyword);
|
|
}
|
|
|
|
.hljs-number {
|
|
color: var(--hljs-number);
|
|
}
|
|
|
|
.hljs-tag,
|
|
.hljs-tag .hljs-title {
|
|
color: var(--hljs-tag);
|
|
font-weight: normal;
|
|
}
|
|
|
|
.hljs-string,
|
|
.hljs-tag .hljs-string,
|
|
.hljs-template-tag,
|
|
.hljs-template-variable,
|
|
.hljs-type {
|
|
color: var(--hljs-string);
|
|
}
|
|
|
|
.hljs-title {
|
|
color: var(--hljs-title);
|
|
}
|
|
|
|
.hljs-quote,
|
|
.hljs-operator,
|
|
.hljs-selector-pseudo,
|
|
.hljs-selector-tag,
|
|
.hljs-link {
|
|
color: var(--hljs-string);
|
|
}
|
|
|
|
.hljs-subst {
|
|
font-weight: normal;
|
|
}
|
|
|
|
.hljs-literal,
|
|
.hljs-class .hljs-title {
|
|
color: var(--hljs-title);
|
|
}
|
|
|
|
.hljs-name {
|
|
color: var(--hljs-name);
|
|
}
|
|
|
|
.hljs-punctuation {
|
|
color: var(--hljs-punctuation);
|
|
}
|
|
|
|
.hljs-attr {
|
|
color: var(--hljs-attr);
|
|
}
|
|
|
|
.hljs-selector-attr,
|
|
.hljs-selector-class,
|
|
.hljs-selector-id {
|
|
color: var(--hljs-attr);
|
|
}
|
|
|
|
.hljs-variable {
|
|
color: var(--hljs-variable);
|
|
}
|
|
|
|
.hljs-attribute {
|
|
color: var(--hljs-attribute);
|
|
}
|
|
|
|
.hljs-regexp {
|
|
color: var(--success);
|
|
}
|
|
|
|
.hljs-symbol,
|
|
.hljs-prompt {
|
|
color: var(--hljs-symbol);
|
|
}
|
|
|
|
.hljs-built_in,
|
|
.hljs-builtin-name {
|
|
color: var(--hljs-name);
|
|
}
|
|
|
|
.hljs-deletion {
|
|
background: var(--danger-low);
|
|
color: var(--hljs-deletion);
|
|
}
|
|
|
|
.hljs-addition {
|
|
background: var(--success-low);
|
|
color: var(--hljs-addition);
|
|
}
|
|
|
|
.hljs-section {
|
|
color: var(--hljs-name);
|
|
}
|
|
|
|
.hljs-bullet {
|
|
color: var(--hljs-attribute);
|
|
}
|
|
|
|
.hljs-emphasis {
|
|
color: var(--hljs-comment);
|
|
font-style: italic;
|
|
}
|
|
|
|
.hljs-strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.fullscreen-code-modal.-max {
|
|
width: 100dvw;
|
|
height: 100dvh;
|
|
right: 0;
|
|
left: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
|
|
.d-modal__container {
|
|
height: 100dvh;
|
|
width: 100dvw;
|
|
max-width: 100vw !important;
|
|
}
|
|
|
|
.d-modal__body {
|
|
padding: 0;
|
|
}
|
|
|
|
.highlighted-code {
|
|
height: 100dvh;
|
|
width: 100dvw;
|
|
}
|
|
}
|
|
|
|
.highlighted-code__editor {
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
.highlighted-code__body {
|
|
display: flex;
|
|
}
|
|
|
|
.highlighted-code__background-layer,
|
|
.highlighted-code__numbers-layer {
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.highlighted-code__background-layer,
|
|
.highlighted-code__numbers-layer,
|
|
.highlighted-code__code {
|
|
font-size: 14px;
|
|
line-height: calc((13 + 4) / 13);
|
|
margin: 0;
|
|
}
|
|
|
|
.highlighted-code__numbers-layer {
|
|
padding: 0.5rem 0;
|
|
|
|
.number {
|
|
display: block;
|
|
text-align: right;
|
|
width: 50px;
|
|
color: var(--primary-300);
|
|
padding-inline: 4px;
|
|
box-sizing: border-box;
|
|
}
|
|
}
|
|
|
|
.highlighted-code__background-layer {
|
|
padding: 0.5rem;
|
|
|
|
.highlighted-code__line-placeholder {
|
|
&.-highlighted {
|
|
background: var(--d-selected);
|
|
margin-left: -0.5rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
.highlighted-code__code {
|
|
position: absolute;
|
|
top: 0;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 0.5rem;
|
|
margin: 0;
|
|
|
|
code {
|
|
display: block;
|
|
background: none;
|
|
overflow-x: auto;
|
|
padding: 0;
|
|
border-radius: 0;
|
|
}
|
|
}
|
|
|
|
.highlighted-code__line-placeholder {
|
|
display: inline-block;
|
|
width: 100%;
|
|
|
|
&.-highlighted {
|
|
box-sizing: border-box;
|
|
}
|
|
}
|
|
|
|
.highlighted-code {
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--header_background);
|
|
}
|
|
|
|
.highlighted-code__header {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
background: var(--primary-200);
|
|
border-bottom: 1px solid var(--primary-300);
|
|
padding-inline: 12px;
|
|
justify-content: space-between;
|
|
padding-block: 0.25rem;
|
|
|
|
.highlighted-code__path {
|
|
font-size: var(--font-down-2);
|
|
font-family: var(--d-font-family--monospace);
|
|
color: var(--primary-700);
|
|
|
|
@include ellipsis;
|
|
}
|
|
|
|
.highlighted-code__header-actions {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
}
|
|
|
|
.highlighted-code__copy-btn,
|
|
.highlighted-code__expand-btn {
|
|
@include unselectable;
|
|
font-size: var(--font-down-2);
|
|
cursor: pointer;
|
|
color: var(--primary-medium);
|
|
}
|
|
}
|
|
|
|
.highlighted-code__wrapper {
|
|
margin-top: 4px;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.post-stream {
|
|
.highlighted-code {
|
|
overflow: hidden;
|
|
background-color: var(--hljs-bg);
|
|
border-radius: var(--d-border-radius);
|
|
}
|
|
}
|