css: Move night theme pygments CSS to night_mode.scss.

The previous architecture did not work properly with the automatically
detected night theme, resulting in a weird mix of the night and day
themes on code blocks.

I'm not thrilled with the requirement this imposes that all of our
night theme CSS needs to be in one file, but we do need to get a quick
fix out here.

Fixes #15554.
This commit is contained in:
Tim Abbott 2020-06-24 12:33:23 -07:00
parent 2a6ef2b9eb
commit 148f74d3a7
2 changed files with 177 additions and 182 deletions

View File

@ -519,6 +519,182 @@ on a dark background, and don't change the dark labels dark either. */
background-color: hsla(355, 37%, 31%, 1);
box-shadow: 0px 0px 0px 1px hsla(330, 40%, 20%, 1);
}
.codehilite code,
.codehilite pre {
color: hsl(212, 100%, 82%);
background-color: hsl(212, 25%, 15%);
}
.codehilite .hll {
background-color: hsl(0, 0%, 13%);
}
.codehilite .err {
color: hsl(1, 67%, 66%);
background-color: hsl(0, 7%, 22%);
}
.codehilite .k {
color: hsl(31, 85%, 59%);
}
.codehilite .p {
color: hsl(179, 27%, 35%);
}
.codehilite .cs {
color: hsl(0, 100%, 40%);
font-weight: 700;
}
.codehilite .gd {
color: hsl(0, 100%, 40%);
}
.codehilite .ge {
color: hsl(0, 0%, 80%);
font-style: italic;
}
.codehilite .gr {
color: hsl(0, 100%, 50%);
}
.codehilite .go {
color: hsl(0, 0%, 50%);
}
.codehilite .gs {
color: hsl(0, 0%, 80%);
font-weight: 700;
}
.codehilite .gu {
color: hsl(300, 100%, 25%);
font-weight: 700;
}
.codehilite .gt {
color: hsl(222, 100%, 41%);
}
.codehilite .kc {
color: hsl(0, 45%, 75%);
}
.codehilite .kd {
color: hsl(60, 100%, 76%);
}
.codehilite .kn {
color: hsl(24, 56%, 72%);
font-weight: 700;
}
.codehilite .kp {
color: hsl(62, 36%, 71%);
}
.codehilite .kr {
color: hsl(359, 58%, 56%);
}
.codehilite .ni {
color: hsl(359, 35%, 63%);
}
.codehilite .ne {
color: hsl(53, 23%, 69%);
font-weight: 700;
}
.codehilite .nn {
color: hsl(204, 54%, 72%);
}
.codehilite .vi {
color: hsl(60, 100%, 89%);
}
.codehilite .c,
.codehilite .g,
.codehilite .cm,
.codehilite .cp,
.codehilite .c1 {
color: hsl(209, 15%, 55%);
}
.codehilite .l,
.codehilite .x,
.codehilite .no,
.codehilite .nd,
.codehilite .nl,
.codehilite .nx,
.codehilite .py,
.codehilite .w {
color: hsl(0, 0%, 80%);
}
.codehilite .n,
.codehilite .nv,
.codehilite .vg {
color: hsl(60, 19%, 83%);
}
.codehilite .o,
.codehilite .ow {
color: hsl(58, 52%, 88%);
}
.codehilite .gh,
.codehilite .gp {
color: hsl(60, 19%, 83%);
font-weight: 700;
}
.codehilite .gi,
.codehilite .kt {
color: hsl(120, 100%, 40%);
}
.codehilite .ld,
.codehilite .s,
.codehilite .sb,
.codehilite .sc,
.codehilite .sd,
.codehilite .s2,
.codehilite .se,
.codehilite .sh,
.codehilite .si,
.codehilite .sx,
.codehilite .sr,
.codehilite .s1,
.codehilite .ss {
color: hsl(0, 36%, 69%);
}
.codehilite .m,
.codehilite .mf,
.codehilite .mh,
.codehilite .mi,
.codehilite .mo,
.codehilite .il {
color: hsl(183, 45%, 69%);
}
.codehilite .na,
.codehilite .nt {
color: hsl(127, 25%, 68%);
}
.codehilite .nb,
.codehilite .nc,
.codehilite .nf,
.codehilite .bp,
.codehilite .vc {
color: hsl(60, 75%, 75%);
}
}
#message-edit-history {
@ -792,7 +968,7 @@ on a dark background, and don't change the dark labels dark either. */
}
@media (prefers-color-scheme: dark) {
.color-scheme-automatic {
body.color-scheme-automatic {
@extend body.night-mode;
}
}

View File

@ -209,184 +209,3 @@
.codehilite .il {
color: hsl(0, 0%, 40%);
} /* Literal.Number.Integer.Long */
/* Syntx Highlighting for night-mode */
body.night-mode .rendered_markdown {
.codehilite code,
.codehilite pre {
color: hsl(212, 100%, 82%);
background-color: hsl(212, 25%, 15%);
}
.codehilite .hll {
background-color: hsl(0, 0%, 13%);
}
.codehilite .err {
color: hsl(1, 67%, 66%);
background-color: hsl(0, 7%, 22%);
}
.codehilite .k {
color: hsl(31, 85%, 59%);
}
.codehilite .p {
color: hsl(179, 27%, 35%);
}
.codehilite .cs {
color: hsl(0, 100%, 40%);
font-weight: 700;
}
.codehilite .gd {
color: hsl(0, 100%, 40%);
}
.codehilite .ge {
color: hsl(0, 0%, 80%);
font-style: italic;
}
.codehilite .gr {
color: hsl(0, 100%, 50%);
}
.codehilite .go {
color: hsl(0, 0%, 50%);
}
.codehilite .gs {
color: hsl(0, 0%, 80%);
font-weight: 700;
}
.codehilite .gu {
color: hsl(300, 100%, 25%);
font-weight: 700;
}
.codehilite .gt {
color: hsl(222, 100%, 41%);
}
.codehilite .kc {
color: hsl(0, 45%, 75%);
}
.codehilite .kd {
color: hsl(60, 100%, 76%);
}
.codehilite .kn {
color: hsl(24, 56%, 72%);
font-weight: 700;
}
.codehilite .kp {
color: hsl(62, 36%, 71%);
}
.codehilite .kr {
color: hsl(359, 58%, 56%);
}
.codehilite .ni {
color: hsl(359, 35%, 63%);
}
.codehilite .ne {
color: hsl(53, 23%, 69%);
font-weight: 700;
}
.codehilite .nn {
color: hsl(204, 54%, 72%);
}
.codehilite .vi {
color: hsl(60, 100%, 89%);
}
.codehilite .c,
.codehilite .g,
.codehilite .cm,
.codehilite .cp,
.codehilite .c1 {
color: hsl(209, 15%, 55%);
}
.codehilite .l,
.codehilite .x,
.codehilite .no,
.codehilite .nd,
.codehilite .nl,
.codehilite .nx,
.codehilite .py,
.codehilite .w {
color: hsl(0, 0%, 80%);
}
.codehilite .n,
.codehilite .nv,
.codehilite .vg {
color: hsl(60, 19%, 83%);
}
.codehilite .o,
.codehilite .ow {
color: hsl(58, 52%, 88%);
}
.codehilite .gh,
.codehilite .gp {
color: hsl(60, 19%, 83%);
font-weight: 700;
}
.codehilite .gi,
.codehilite .kt {
color: hsl(120, 100%, 40%);
}
.codehilite .ld,
.codehilite .s,
.codehilite .sb,
.codehilite .sc,
.codehilite .sd,
.codehilite .s2,
.codehilite .se,
.codehilite .sh,
.codehilite .si,
.codehilite .sx,
.codehilite .sr,
.codehilite .s1,
.codehilite .ss {
color: hsl(0, 36%, 69%);
}
.codehilite .m,
.codehilite .mf,
.codehilite .mh,
.codehilite .mi,
.codehilite .mo,
.codehilite .il {
color: hsl(183, 45%, 69%);
}
.codehilite .na,
.codehilite .nt {
color: hsl(127, 25%, 68%);
}
.codehilite .nb,
.codehilite .nc,
.codehilite .nf,
.codehilite .bp,
.codehilite .vc {
color: hsl(60, 75%, 75%);
}
}