|
|
@@ -2,139 +2,131 @@ import { PrismTheme } from 'prism-react-renderer' |
|
|
|
|
|
|
|
const theme: PrismTheme = { |
|
|
|
plain: { |
|
|
|
backgroundColor: "transparent", |
|
|
|
color: "#ffffff" |
|
|
|
backgroundColor: 'transparent', |
|
|
|
color: 'currentColor', |
|
|
|
}, |
|
|
|
styles: [ |
|
|
|
{ |
|
|
|
types: ["comment", "prolog", "doctype", "cdata"], |
|
|
|
types: ['comment', 'prolog', 'doctype', 'cdata'], |
|
|
|
style: { |
|
|
|
// color: "#6c6783" |
|
|
|
// color: '#6c6783' |
|
|
|
opacity: 0.3, |
|
|
|
fontStyle: 'italic', |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["namespace"], |
|
|
|
types: ['namespace'], |
|
|
|
style: { |
|
|
|
opacity: 0.7 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["number", "boolean", "hexcode"], |
|
|
|
types: ['number', 'boolean', 'hexcode'], |
|
|
|
style: { |
|
|
|
color: "#74f95e", |
|
|
|
color: 'var(--color-code-number)', |
|
|
|
fontWeight: 'bold', |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["tag", "operator", "keyword", "atrule", "selector"], |
|
|
|
types: ['tag', 'operator', 'keyword', 'atrule', 'selector', 'important'], |
|
|
|
style: { |
|
|
|
color: "#ff4389", |
|
|
|
color: 'var(--color-code-keyword)', |
|
|
|
fontWeight: 'bold', |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["type", "class"], |
|
|
|
types: ['type'], |
|
|
|
style: { |
|
|
|
color: "#5097D2", |
|
|
|
color: 'var(--color-code-type)', |
|
|
|
fontWeight: 'bold', |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["punctuation"], |
|
|
|
types: ['punctuation'], |
|
|
|
style: { |
|
|
|
color: "#ffffff" |
|
|
|
color: 'currentColor' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["function"], |
|
|
|
types: ['function'], |
|
|
|
style: { |
|
|
|
color: "#67c252", |
|
|
|
color: 'var(--color-code-function)', |
|
|
|
fontStyle: 'italic', |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["parameter"], |
|
|
|
types: ['parameter'], |
|
|
|
style: { |
|
|
|
color: "#915ec2" |
|
|
|
color: 'var(--color-code-parameter)' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["property"], |
|
|
|
types: ['property', 'attr-name'], |
|
|
|
style: { |
|
|
|
color: "#ffa1c9" |
|
|
|
color: 'var(--color-code-property)' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["tag-id", "atrule-id"], |
|
|
|
types: ['string', 'attr-value', 'unit'], |
|
|
|
style: { |
|
|
|
color: "#eeebff" |
|
|
|
color: 'var(--color-code-string)' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["attr-name"], |
|
|
|
types: ['variable'], |
|
|
|
style: { |
|
|
|
color: "#ffa1c9" |
|
|
|
color: 'var(--color-code-variable)' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["string", "attr-value", 'unit'], |
|
|
|
types: [ |
|
|
|
'regex', |
|
|
|
], |
|
|
|
style: { |
|
|
|
color: "#eed371" |
|
|
|
color: 'var(--color-code-regexp)' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["variable"], |
|
|
|
types: [ |
|
|
|
'entity', |
|
|
|
], |
|
|
|
style: { |
|
|
|
color: "#8bc275" |
|
|
|
} |
|
|
|
fontWeight: 'bold', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: [ |
|
|
|
"entity", |
|
|
|
"url", |
|
|
|
"control", |
|
|
|
"directive", |
|
|
|
"statement", |
|
|
|
"regex", |
|
|
|
|
|
|
|
"placeholder", |
|
|
|
'url', |
|
|
|
], |
|
|
|
style: { |
|
|
|
color: "#ffcc99" |
|
|
|
color: 'var(--color-code-url)', |
|
|
|
textDecorationLine: 'underline', |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["deleted"], |
|
|
|
types: ['deleted'], |
|
|
|
style: { |
|
|
|
textDecorationLine: "line-through" |
|
|
|
textDecorationLine: 'line-through' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["inserted"], |
|
|
|
types: ['inserted'], |
|
|
|
style: { |
|
|
|
textDecorationLine: "underline" |
|
|
|
textDecorationLine: 'underline' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["italic"], |
|
|
|
types: ['italic'], |
|
|
|
style: { |
|
|
|
fontStyle: "italic" |
|
|
|
fontStyle: 'italic' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["important", "bold"], |
|
|
|
types: ['bold'], |
|
|
|
style: { |
|
|
|
fontWeight: "bold" |
|
|
|
fontWeight: 'bold' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
types: ["important"], |
|
|
|
style: { |
|
|
|
color: "#c4b9fe" |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|