update prism code theme

This commit is contained in:
toast 2021-03-22 11:19:34 -07:00
parent 71d541c4b3
commit bb9e75c1fe

View File

@ -9,14 +9,14 @@ import { css } from "@emotion/react";
const customTheme = { const customTheme = {
plain: { plain: {
backgroundColor: "#2a2734", backgroundColor: "#1f212a",
color: "#6f7278", color: "#6f7278",
}, },
styles: [ styles: [
{ {
types: ["comment", "prolog", "doctype", "cdata"], types: ["comment", "prolog", "doctype", "cdata"],
style: { style: {
color: "#6c6783", color: "#6c6783eeebff",
}, },
}, },
{ {
@ -46,11 +46,11 @@ const customTheme = {
{ {
types: ["property", "function"], types: ["property", "function"],
style: { style: {
color: "#9a86fd", color: "#eeebff",
}, },
}, },
{ {
types: ["tag-id", "selector", "atrule-id"], types: ["tag-id", "selector", "atrul-id"],
style: { style: {
color: "#eeebff", color: "#eeebff",
}, },
@ -63,17 +63,13 @@ const customTheme = {
}, },
{ {
types: [ types: [
"boolean",
"string",
"entity", "entity",
"url",
"attr-value", "attr-value",
"keyword", "keyword",
"control", "control",
"directive", "directive",
"unit", "unit",
"statement", "statement",
"regex",
"at-rule", "at-rule",
"placeholder", "placeholder",
"variable", "variable",
@ -82,6 +78,17 @@ const customTheme = {
color: "#99ceff", color: "#99ceff",
}, },
}, },
{
types: [
"boolean",
"string",
"url",
"regex",
],
style: {
color: "#b5ffff",
},
},
{ {
types: ["deleted"], types: ["deleted"],
style: { style: {
@ -155,7 +162,7 @@ const STYLES_PRE = css`
const STYLES_CODE = css` const STYLES_CODE = css`
box-sizing: border-box; box-sizing: border-box;
background-color: #1f212a; user-select: text;
font-family: ${Constants.font.code}; font-family: ${Constants.font.code};
color: ${Constants.system.gray}; color: ${Constants.system.gray};
width: 100%; width: 100%;
@ -163,6 +170,7 @@ const STYLES_CODE = css`
`; `;
class CodeBlock extends React.Component { class CodeBlock extends React.Component {
//defaults to js
language = this.props.language ? this.props.language : "javascript"; language = this.props.language ? this.props.language : "javascript";
render() { render() {
return ( return (