on master help sign in
css: themed syntax highlighting with @urcades
commit6cca7d4d71a2d47d9a82b94a11b59e8286180348 authorMatilde Park <matilde.park@gmail.com> dateFri 2 Jul 2021, 15:02 (5 years ago) parent4783292
2 files changed+16−9
styles/prism.css+14−9 tailwind.config.js+2
styles/prism.css+14−9
@@ -8,9 +8,9 @@ https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+ja
88
99code[class*="language-"],
1010pre[class*="language-"] {
11− color: black;
11+ @apply text-gray;
1212 background: none;
13− font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
13+ font-family: "Source Code Pro", monospace;
1414 font-size: 1em;
1515 text-align: left;
1616 white-space: pre;
@@ -67,11 +67,14 @@ code[class*="language-"] {
6767.token.tag,
6868.token.boolean,
6969.token.number,
70−.token.function-name,
7170.token.constant,
7271.token.symbol,
7372.token.deleted {
74− color: #c92c2c;
73+ @apply text-red;
74+}
75+
76+.token.function-name {
77+ @apply text-black;
7578}
7679
7780.token.selector,
@@ -81,22 +84,24 @@ code[class*="language-"] {
8184.token.function,
8285.token.builtin,
8386.token.inserted {
84− color: #2f9c0a;
87+ @apply text-green;
8588}
8689
8790.token.operator,
8891.token.entity,
8992.token.url,
9093.token.variable {
91− color: #a67f59;
92− background: rgba(255, 255, 255, 0.5);
94+ @apply text-gray;
9395}
9496
9597.token.atrule,
9698.token.attr-value,
97−.token.keyword,
9899.token.class-name {
99− color: #1990b8;
100+ @apply text-blue;
101+}
102+
103+.token.keyword {
104+ @apply text-purple;
100105}
101106
102107.token.regex,
tailwind.config.js+2
@@ -17,6 +17,8 @@ module.exports = {
1717 lightGreen: "rgba(0, 159, 101, 0.3)",
1818 washedGreen: "rgba(0, 159, 101, 0.05)",
1919 blue: "#219DFF",
20+ purple: "rgba(157,82,255,0.8)",
21+ red: "#ff4136",
2022 },
2123 fontFamily: {
2224 sans: ["Inter", "-apple-system", "sans-serif"],