style: refine syntax highlighting styles for better readability

This commit is contained in:
Seth 2025-05-18 19:14:32 -04:00
parent a21aa34104
commit 0d470d43d8

View file

@ -22,9 +22,10 @@ body {
background-color: rgb(var(--mdui-color-background)); background-color: rgb(var(--mdui-color-background));
} }
[class*="shj-lang-"] { .shj-lang-json {
white-space: pre; white-space: pre;
color: #112; color: #f8f8f2;
background: var(--mdui-color-secondary-container);
text-shadow: none; text-shadow: none;
box-sizing: border-box; box-sizing: border-box;
background: #dedede; background: #dedede;
@ -35,6 +36,14 @@ body {
font: font:
18px / 24px monospace; 18px / 24px monospace;
box-shadow: 0 0 5px #0001; box-shadow: 0 0 5px #0001;
:before {
color: #6f9aff;
}
::selection {
background: #bdf5;
}
} }
.shj-inline { .shj-inline {
@ -44,103 +53,19 @@ body {
display: inline-block; display: inline-block;
} }
[class*="shj-lang-"]::selection {
background: #bdf5;
}
[class*="shj-lang-"] ::selection {
background: #bdf5;
}
/*
[class*="shj-lang-"] > div {
display: flex;
overflow: auto;
}
[class*="shj-lang-"] > div :last-child {
outline: none;
flex: 1;
}
.shj-numbers {
counter-reset: line;
padding-left: 5px;
}
.shj-numbers div {
padding-right: 5px;
}
.shj-numbers div:before {
color: #999;
content: counter(line);
opacity: 0.5;
text-align: right;
counter-increment: line;
margin-right: 5px;
display: block;
}
.shj-syn-cmnt {
font-style: italic;
}
.shj-syn-err,
.shj-syn-kwd {
color: #e16;
}
.shj-syn-num,
.shj-syn-class {
color: #f60;
}
*/
.shj-syn-insert, .shj-syn-insert,
.shj-syn-str { .shj-syn-str {
color: #7d8; color: #7d8;
} }
/*
.shj-syn-bool {
color: #3bf;
}
.shj-syn-type,
.shj-syn-oper {
color: #5af;
}
.shj-syn-section,
.shj-syn-func {
color: #84f;
}
*/
.shj-syn-deleted, .shj-syn-deleted,
.shj-syn-var { .shj-syn-var {
color: #f44; color: #f44;
} }
/*
.shj-oneline {
padding: 12px 10px;
}
.shj-lang-http.shj-oneline .shj-syn-kwd {
color: #fff;
background: #25f;
border-radius: 5px;
padding: 5px 7px;
}
*/
[class*="shj-lang-"] {
color: #f8f8f2;
background: var(--mdui-color-secondary-container);
}
[class*="shj-lang-"]:before {
color: #6f9aff;
}
.shj-syn-deleted, .shj-syn-deleted,
.shj-syn-err, .shj-syn-err,
@ -148,36 +73,7 @@ body {
color: #ff5261; color: #ff5261;
} }
/*
.shj-syn-section,
.shj-syn-kwd {
color: #ff7cc6;
}
.shj-syn-class {
color: #eab07c;
}
.shj-numbers,
.shj-syn-cmnt {
color: #7d828b;
}
.shj-syn-insert,
.shj-syn-type,
.shj-syn-func,
.shj-syn-bool {
color: #71d58a;
}
.shj-syn-num {
color: #b581fd;
}
.shj-syn-oper {
color: #80c6ff;
}
*/
.shj-syn-str { .shj-syn-str {
color: #4dacfa; color: #4dacfa;
} }