Improve formatting of code highlighting styles

This commit is contained in:
Eryn Wells 2024-07-23 08:43:41 -07:00
parent 3b642fa002
commit 293f0ba957

View file

@ -146,272 +146,242 @@ hr {
} }
.content { .codeblock {
.codeblock { .err {
color: var(--foreground); color: var(--red);
background-color: var(--background); }
border: 1px solid var(--gray6);
.err { /* line link */
color: var(--red); .lnlinks {
} outline: none;
text-decoration: none;
color: inherit;
}
/* line link */ .line {
.lnlinks { display: flex;
outline: none; }
text-decoration: none;
color: inherit;
}
.line { /* keyword */
display: flex; .k {
} color: var(--purple);
}
/* keyword */ /* keyword: constant */
.k { /* keyword: declaration */
color: var(--purple); /* keyword: pseudo */
} /* keyword: reserved */
.kc, .kd, .kp, .kr {
color: var(--orange);
}
/* keyword: constant */ /* keyword: namespace */
/* keyword: declaration */ .kn {
/* keyword: pseudo */ color: var(--yellow);
/* keyword: reserved */ }
.kc, .kd, .kp, .kr {
color: var(--orange);
}
/* keyword: namespace */ /* keyword: type */
.kn { .kt {
color: var(--yellow); color: var(--yellow);
} font-weight: bolder;
}
/* keyword: type */ /* line highlight */
.kt { .hl {
color: var(--yellow); background-color: var(--selection);
font-weight: bolder; }
}
/* line highlight */ /* line numbers */
.hl { .ln {
background-color: var(--selection); white-space: pre;
} -webkit-user-select: none;
user-select: none;
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
color: #7f7f7f;
}
/* line numbers */ /* NameAttribute */
.ln { .na {
white-space: pre; color: #a6e22e;
-webkit-user-select: none; }
user-select: none;
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
color: #7f7f7f;
}
/* NameAttribute */ /* NameClass */
.na { .nc {
color: #a6e22e; color: #a6e22e;
} }
/* NameClass */ /* NameConstant */
.nc { .no {
color: #a6e22e; color: #66d9ef;
} }
/* NameConstant */ /* name: decorator */
.no { .nd {
color: #66d9ef; color: #a6e22e;
} }
/* name: decorator */ /* name: exception */
.nd { .ne {
color: #a6e22e; color: var(--green);
} font-weight: bolder;
}
/* name: exception */ /* NameFunction */
.ne { .nf {
color: var(--green); color: var(--green);
font-weight: bolder; }
}
/* NameFunction */ /* NameOther */
.nf { .nx {
color: var(--green); color: #a6e22e;
} }
/* NameOther */ /* NameTag */
.nx { .nt {
color: #a6e22e; color: #f92672;
} }
/* NameTag */ /* Literal */
.nt { .l {
color: #f92672; color: #ae81ff;
} }
/* Literal */ /* LiteralDate */
.l { .ld {
color: #ae81ff; color: #e6db74;
} }
/* LiteralDate */ /* LiteralString */
.ld { .s {
color: #e6db74; color: #e6db74;
} }
/* LiteralString */ /* LiteralStringBacktick */
.s { .sb {
color: #e6db74; color: #e6db74;
} }
/* LiteralStringBacktick */ /* LiteralStringChar */
.sb { .sc {
color: #e6db74; color: #e6db74;
} }
/* LiteralStringChar */ /* LiteralStringDelimiter */
.sc { .dl {
color: #e6db74; color: #e6db74;
} }
/* LiteralStringDelimiter */ /* LiteralNumberIntegerLong */
.dl { .il {
color: #e6db74; color: #ae81ff;
} }
/* LiteralNumberIntegerLong */ /* literal: number */
.il { /* literal: number, bin */
color: #ae81ff; /* literal: number, float */
} /* literal: number, hex */
/* literal: number, integer */
.m, .mb, .mf, .mh, .mi {
color: var(--purple);
font-weight: bolder;
}
/* literal: number */ /* LiteralNumberOct */
/* literal: number, bin */ .mo {
/* literal: number, float */ color: #ae81ff;
/* literal: number, hex */ }
/* literal: number, integer */
.m, .mb, .mf, .mh, .mi {
color: var(--purple);
font-weight: bolder;
}
/* LiteralNumberOct */ /* name: built-in */
.mo { .nb {
color: #ae81ff; color: var(--green);
} }
/* name: built-in */ /* Operator */
.nb { .o {
color: var(--green); color: var(--orange);
} }
/* Operator */ /* OperatorWord */
.o { .ow {
color: var(--orange); color: #f92672;
} }
/* OperatorWord */ /* LiteralStringDoc */
.ow { .sd {
color: #f92672; color: #e6db74;
} }
/* LiteralStringDoc */ /* LiteralStringDouble */
.sd { .s2 {
color: #e6db74; color: #e6db74;
} }
/* LiteralStringDouble */ /* LiteralStringEscape */
.s2 { .se {
color: #e6db74; color: #ae81ff;
} }
/* LiteralStringEscape */ /* LiteralStringHeredoc */
.se { .sh {
color: #ae81ff; color: #e6db74;
} }
/* LiteralStringHeredoc */ /* LiteralStringInterpol */
.sh { .si {
color: #e6db74; color: #e6db74;
} }
/* LiteralStringInterpol */ /* LiteralStringOther */
.si { .sx {
color: #e6db74; color: #e6db74;
} }
/* LiteralStringOther */ /* literal: string, regex */
.sx { .sr {
color: #e6db74; color: var(--green);
} }
/* literal: string, regex */ /* literal: string, affix */
.sr { /* literal: string, single */
color: var(--green); /* literal: string, symbol */
} .sa, .s1, .ss {
color: var(--yellow);
}
/* literal: string, affix */ /* comment */
/* literal: string, single */ /* comment: hashbang */
/* literal: string, symbol */ /* comment: multiline */
.sa, .s1, .ss { /* comment: single */
color: var(--yellow); /* comment: special */
} /* comment: preproc */
/* comment: preproc file */
.c, .ch, .cm, .c1, .cs, .cp, .cpf {
color: #75715e;
}
/* Comment */ /* GenericDeleted */
.c { .gd {
color: #75715e; color: #f92672;
} }
/* CommentHashbang */ /* GenericEmph */
.ch { .ge {
color: #75715e; font-style: italic;
} }
/* CommentMultiline */ /* GenericInserted */
.cm { .gi {
color: #75715e; color: #a6e22e;
} }
/* CommentSingle */ /* GenericStrong */
.c1 { .gs {
color: #75715e; font-weight: bold;
} }
/* CommentSpecial */ /* GenericSubheading */
.cs { .gu {
color: #75715e; color: #75715e;
}
/* CommentPreproc */
.cp {
color: #75715e;
}
/* CommentPreprocFile */
.cpf {
color: #75715e;
}
/* GenericDeleted */
.gd {
color: #f92672;
}
/* GenericEmph */
.ge {
font-style: italic;
}
/* GenericInserted */
.gi {
color: #a6e22e;
}
/* GenericStrong */
.gs {
font-weight: bold;
}
/* GenericSubheading */
.gu {
color: #75715e;
}
} }
} }