2020-02-10 13:34:57 +01:00
|
|
|
code {
|
2020-04-25 21:25:10 +02:00
|
|
|
display:inline-block;
|
2020-04-28 20:41:07 +02:00
|
|
|
max-width: 100%;
|
|
|
|
padding: 0 .4rem;
|
|
|
|
@include overflow-wrap(break-word);
|
2020-04-29 10:36:23 +02:00
|
|
|
@include line-break(anywhere);
|
2019-08-11 19:36:19 +02:00
|
|
|
font-size: $code-font-size;
|
|
|
|
font-family: $code-font-family;
|
2019-08-16 21:40:34 +02:00
|
|
|
color: $code-color;
|
2020-04-18 14:54:54 +02:00
|
|
|
|
2020-04-27 19:38:22 +02:00
|
|
|
[theme=dark] & {
|
2019-08-16 21:40:34 +02:00
|
|
|
color: $code-color-dark;
|
2019-08-11 19:36:19 +02:00
|
|
|
}
|
2020-04-18 14:54:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
pre {
|
|
|
|
margin: 0;
|
|
|
|
padding: .25rem 0 .25rem .5rem;
|
|
|
|
@include tab-size(4);
|
|
|
|
|
2020-04-25 21:25:10 +02:00
|
|
|
code {
|
|
|
|
padding: 0;
|
2020-04-18 14:54:54 +02:00
|
|
|
}
|
|
|
|
|
2020-04-25 21:25:10 +02:00
|
|
|
img {
|
2020-04-27 19:38:22 +02:00
|
|
|
min-height: 1em;
|
2020-04-28 14:44:58 +02:00
|
|
|
max-height: 1.2em;
|
2020-04-26 17:00:29 +02:00
|
|
|
vertical-align: text-bottom;
|
2020-04-18 14:54:54 +02:00
|
|
|
}
|
2019-08-11 19:36:19 +02:00
|
|
|
}
|
|
|
|
|
2020-02-10 13:34:57 +01:00
|
|
|
code, pre, .highlight table, .highlight tr, .highlight td {
|
|
|
|
background: $code-background-color;
|
|
|
|
|
2020-04-27 19:38:22 +02:00
|
|
|
[theme=dark] & {
|
2020-02-10 13:34:57 +01:00
|
|
|
background: $code-background-color-dark;
|
|
|
|
}
|
2019-08-11 19:36:19 +02:00
|
|
|
}
|
|
|
|
|
2020-04-25 21:25:10 +02:00
|
|
|
.highlight, .gist {
|
|
|
|
font-family: $code-font-family;
|
|
|
|
font-size: $code-font-size;
|
|
|
|
|
|
|
|
.table-wrapper {
|
|
|
|
> table,
|
|
|
|
> table thead,
|
|
|
|
> table tr,
|
|
|
|
> table td {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
border: none !important;
|
|
|
|
}
|
2020-04-18 14:54:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.highlight {
|
2020-04-25 21:25:10 +02:00
|
|
|
line-height: 1.4em;
|
2020-03-21 09:59:23 +01:00
|
|
|
margin: .5rem 0;
|
2019-08-11 19:36:19 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
> .chroma {
|
|
|
|
position: relative;
|
2020-04-25 21:25:10 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.code-header {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
2020-04-25 21:25:10 +02:00
|
|
|
width: 100%;
|
2020-04-29 13:52:31 +02:00
|
|
|
font-family: $global-font-family;
|
|
|
|
font-weight: bold;
|
|
|
|
color: $code-info-color;
|
|
|
|
background: darken($code-background-color, 8%);
|
2020-04-25 21:25:10 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
[theme=dark] & {
|
|
|
|
color: $code-info-color-dark;
|
|
|
|
background: darken($code-background-color-dark, 6%);
|
|
|
|
}
|
2019-08-11 19:36:19 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
2020-04-25 21:25:10 +02:00
|
|
|
}
|
2019-08-11 19:36:19 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.code-title {
|
|
|
|
width: 100%;
|
|
|
|
padding: .4rem;
|
|
|
|
}
|
2020-04-27 19:38:22 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.code-title::after {
|
|
|
|
padding-left: .2rem;
|
|
|
|
content: 'Code';
|
|
|
|
}
|
2020-04-18 14:54:54 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
@each $type, $text in $code-type-map {
|
|
|
|
&.#{$type} .code-title::after {
|
|
|
|
content: $text;
|
|
|
|
}
|
|
|
|
}
|
2020-04-18 14:54:54 +02:00
|
|
|
}
|
2020-02-10 13:34:57 +01:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.lntd:first-child {
|
|
|
|
min-width: 1.6rem;
|
|
|
|
text-align: right;
|
2019-09-29 09:56:11 +02:00
|
|
|
}
|
2020-03-17 14:16:04 +01:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.lntd:last-child {
|
|
|
|
width: 100%;
|
2020-03-17 14:16:04 +01:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
pre {
|
|
|
|
@include max-content(min-width);
|
|
|
|
}
|
2020-03-17 14:16:04 +01:00
|
|
|
}
|
2020-04-25 21:25:10 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.ln {
|
|
|
|
padding-right: .75rem;
|
|
|
|
}
|
2020-04-25 21:25:10 +02:00
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.hl {
|
|
|
|
display: block;
|
|
|
|
background-color: darken($code-background-color, 10%);
|
2020-04-25 21:25:10 +02:00
|
|
|
|
2020-04-27 19:38:22 +02:00
|
|
|
[theme=dark] & {
|
2020-04-29 13:52:31 +02:00
|
|
|
background-color: darken($code-background-color-dark, 5%);
|
2020-04-25 21:25:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-29 13:52:31 +02:00
|
|
|
.ln, .lnt {
|
|
|
|
color: $global-font-secondary-color;
|
2020-04-25 21:25:10 +02:00
|
|
|
|
2020-04-27 19:38:22 +02:00
|
|
|
[theme=dark] & {
|
2020-04-29 13:52:31 +02:00
|
|
|
color: $global-font-secondary-color-dark;
|
2020-04-25 21:25:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.arrow {
|
2020-04-29 13:52:31 +02:00
|
|
|
padding: 0 .2rem;
|
|
|
|
@include transition(transform 0.2s ease);
|
2020-04-25 21:25:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.ellipses {
|
2020-04-29 13:52:31 +02:00
|
|
|
padding: .4rem;
|
2020-04-25 21:25:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.copy {
|
2020-04-29 13:52:31 +02:00
|
|
|
display: none;
|
|
|
|
padding: .4rem;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
color: $global-link-hover-color;
|
|
|
|
|
|
|
|
[theme=dark] & {
|
|
|
|
color: $global-link-hover-color-dark;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.table-wrapper {
|
|
|
|
max-height: 0;
|
|
|
|
overflow-y: hidden;
|
|
|
|
@include details-transition-open;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
.code-header {
|
|
|
|
background: darken($code-background-color, 3%);
|
|
|
|
|
|
|
|
[theme=dark] & {
|
|
|
|
background: darken($code-background-color-dark, 3%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.table-wrapper {
|
|
|
|
max-height: $MAX_LENGTH;
|
|
|
|
@include details-transition-close;
|
|
|
|
}
|
|
|
|
|
|
|
|
.arrow {
|
|
|
|
@include transform(rotate(90deg));
|
|
|
|
}
|
|
|
|
|
|
|
|
.ellipses {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.copy {
|
|
|
|
display: inline;
|
|
|
|
}
|
2020-04-25 21:25:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-10 13:34:57 +01:00
|
|
|
/* Comment */ .c,
|
|
|
|
/* CommentHashbang */ .ch,
|
|
|
|
/* CommentMultiline */ .cm,
|
|
|
|
/* CommentSingle */ .c1,
|
|
|
|
/* CommentSpecial */ .cs,
|
|
|
|
/* CommentPreproc */ .cp,
|
|
|
|
/* CommentPreprocFile */ .cpf { font-style: italic }
|
|
|
|
/* GenericUnderline */ .gl { text-decoration: underline }
|
|
|
|
|
|
|
|
@each $class, $color in $code-highlight-color-map {
|
|
|
|
.#{$class} { color: $color; }
|
|
|
|
}
|
2019-08-11 19:36:19 +02:00
|
|
|
|
2020-04-27 19:38:22 +02:00
|
|
|
[theme=dark] & {
|
2020-02-10 13:34:57 +01:00
|
|
|
@each $class, $color in $code-highlight-color-map-dark {
|
|
|
|
.#{$class} { color: $color; }
|
|
|
|
}
|
2019-08-11 19:36:19 +02:00
|
|
|
}
|
|
|
|
}
|
2020-03-14 10:29:39 +01:00
|
|
|
|
|
|
|
.gist {
|
|
|
|
.gist-file, .gist-data, .gist-meta {
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gist-meta {
|
|
|
|
padding: .4rem .8rem;
|
|
|
|
background-color: darken($code-background-color, 5%);
|
|
|
|
|
2020-03-17 14:16:04 +01:00
|
|
|
@include link(false, false);
|
2020-03-14 10:29:39 +01:00
|
|
|
|
2020-04-27 19:38:22 +02:00
|
|
|
[theme=dark] & {
|
2020-03-14 10:29:39 +01:00
|
|
|
background-color: darken($code-background-color-dark, 5%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-27 19:38:22 +02:00
|
|
|
[theme=dark] & {
|
2020-03-14 10:29:39 +01:00
|
|
|
// imported from https://github.com/lonekorean/gist-syntax-themes/blob/master/stylesheets/one-dark.css
|
|
|
|
.highlight {
|
|
|
|
background: #141414;
|
|
|
|
}
|
|
|
|
.blob-num,
|
|
|
|
.blob-code-inner,
|
|
|
|
.highlight,
|
|
|
|
.pl-enm,
|
|
|
|
.pl-ko,
|
|
|
|
.pl-mo,
|
|
|
|
.pl-mp1 .pl-sf,
|
|
|
|
.pl-ms,
|
|
|
|
.pl-pdc1,
|
|
|
|
.pl-scp,
|
|
|
|
.pl-smc,
|
|
|
|
.pl-som,
|
|
|
|
.pl-va,
|
|
|
|
.pl-vpf,
|
|
|
|
.pl-vpu,
|
|
|
|
.pl-mdr {
|
|
|
|
color: #aab1bf;
|
|
|
|
}
|
|
|
|
.pl-mb,
|
|
|
|
.pl-pdb {
|
|
|
|
font-weight: 700;
|
|
|
|
}
|
|
|
|
.pl-c,
|
|
|
|
.pl-c span,
|
|
|
|
.pl-pdc {
|
|
|
|
color: #5b6270;
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
.pl-sr .pl-cce {
|
|
|
|
color: #56b5c2;
|
|
|
|
font-weight: 400;
|
|
|
|
}
|
|
|
|
.pl-ef,
|
|
|
|
.pl-en,
|
|
|
|
.pl-enf,
|
|
|
|
.pl-eoai,
|
|
|
|
.pl-kos,
|
|
|
|
.pl-mh .pl-pdh,
|
|
|
|
.pl-mr {
|
|
|
|
color: #61afef;
|
|
|
|
}
|
|
|
|
.pl-ens,
|
|
|
|
.pl-vi {
|
|
|
|
color: #be5046;
|
|
|
|
}
|
|
|
|
.pl-enti,
|
|
|
|
.pl-mai .pl-sf,
|
|
|
|
.pl-ml,
|
|
|
|
.pl-sf,
|
|
|
|
.pl-sr,
|
|
|
|
.pl-sr .pl-sra,
|
|
|
|
.pl-src,
|
|
|
|
.pl-st,
|
|
|
|
.pl-vo {
|
|
|
|
color: #56b5c2;
|
|
|
|
}
|
|
|
|
.pl-eoi,
|
|
|
|
.pl-mri,
|
|
|
|
.pl-pds,
|
|
|
|
.pl-pse .pl-s1,
|
|
|
|
.pl-s,
|
|
|
|
.pl-s1 {
|
|
|
|
color: #97c279;
|
|
|
|
}
|
|
|
|
.pl-k,
|
|
|
|
.pl-kolp,
|
|
|
|
.pl-mc,
|
|
|
|
.pl-pde {
|
|
|
|
color: #c578dd;
|
|
|
|
}
|
|
|
|
.pl-mi,
|
|
|
|
.pl-pdi {
|
|
|
|
color: #c578dd;
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
.pl-mp,
|
|
|
|
.pl-stp {
|
|
|
|
color: #818896;
|
|
|
|
}
|
|
|
|
.pl-mdh,
|
|
|
|
.pl-mdi,
|
|
|
|
.pl-mdr {
|
|
|
|
font-weight: 400;
|
|
|
|
}
|
|
|
|
.pl-mdht,
|
|
|
|
.pl-mi1 {
|
|
|
|
color: #97c279;
|
|
|
|
background: #020;
|
|
|
|
}
|
|
|
|
.pl-md,
|
|
|
|
.pl-mdhf {
|
|
|
|
color: #df6b75;
|
|
|
|
background: #200;
|
|
|
|
}
|
|
|
|
.pl-corl {
|
|
|
|
color: #df6b75;
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
.pl-ib {
|
|
|
|
background: #df6b75;
|
|
|
|
}
|
|
|
|
.pl-ii {
|
|
|
|
background: #e0c184;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
.pl-iu {
|
|
|
|
background: #e05151;
|
|
|
|
}
|
|
|
|
.pl-ms1 {
|
|
|
|
color: #aab1bf;
|
|
|
|
background: #373b41;
|
|
|
|
}
|
|
|
|
.pl-c1,
|
|
|
|
.pl-cn,
|
|
|
|
.pl-e,
|
|
|
|
.pl-eoa,
|
|
|
|
.pl-eoac,
|
|
|
|
.pl-eoac .pl-pde,
|
|
|
|
.pl-kou,
|
|
|
|
.pl-mm,
|
|
|
|
.pl-mp .pl-s3,
|
|
|
|
.pl-mq,
|
|
|
|
.pl-s3,
|
|
|
|
.pl-sok,
|
|
|
|
.pl-sv,
|
|
|
|
.pl-mb {
|
|
|
|
color: #d19965;
|
|
|
|
}
|
|
|
|
.pl-enc,
|
|
|
|
.pl-entc,
|
|
|
|
.pl-pse .pl-s2,
|
|
|
|
.pl-s2,
|
|
|
|
.pl-sc,
|
|
|
|
.pl-smp,
|
|
|
|
.pl-sr .pl-sre,
|
|
|
|
.pl-stj,
|
|
|
|
.pl-v,
|
|
|
|
.pl-pdb {
|
|
|
|
color: #e4bf7a;
|
|
|
|
}
|
|
|
|
.pl-ent,
|
|
|
|
.pl-entl,
|
|
|
|
.pl-entm,
|
|
|
|
.pl-mh,
|
|
|
|
.pl-pdv,
|
|
|
|
.pl-smi,
|
|
|
|
.pl-sol,
|
|
|
|
.pl-mdh,
|
|
|
|
.pl-mdi {
|
|
|
|
color: #df6b75;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|