From 4c893b11df63532c3a873a823af06275b18beddc Mon Sep 17 00:00:00 2001 From: yakkomajuri Date: Tue, 9 Feb 2021 09:14:07 +0000 Subject: [PATCH 1/2] add okaidia theme --- src/themes/okaidia.js | 113 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 src/themes/okaidia.js diff --git a/src/themes/okaidia.js b/src/themes/okaidia.js new file mode 100644 index 0000000..8b1b609 --- /dev/null +++ b/src/themes/okaidia.js @@ -0,0 +1,113 @@ +/* + Adapted from the Prism Okaidia theme + https://github.com/PrismJS/prism/blob/1761513e3db48ca9222037644a9c68746e24f039/themes/prism-okaidia.css + https://github.com/ocodia/okaidia-prismjs-theme +*/ + +import type { PrismTheme } from "../types"; + +var theme: PrismTheme = { + plain: { + color: '#f8f8f2', + backgroundColor: '#272822', + }, + styles: [ + { + types: ['changed'], + style: { + color: 'rgb(162, 191, 252)', + fontStyle: 'italic', + }, + }, + { + types: ['deleted'], + style: { + color: '#f92672', + fontStyle: 'italic', + }, + }, + { + types: ['inserted', 'attr-name'], + style: { + color: 'rgb(173, 219, 103)', + fontStyle: 'italic', + }, + }, + { + types: ['comment'], + style: { + color: '#8292a2', + fontStyle: 'italic', + }, + }, + { + types: ['string', 'url'], + style: { + color: '#a6e22e', + }, + }, + { + types: ['variable'], + style: { + color: '#f8f8f2', + }, + }, + { + types: ['number'], + style: { + color: '#ae81ff', + }, + }, + { + types: ['builtin', 'char', 'constant', 'function'], + style: { + color: '#e6db74', + }, + }, + { + types: ['punctuation'], + style: { + color: '#f8f8f2', + }, + }, + { + types: ['selector', 'doctype'], + style: { + color: '#a6e22e', + fontStyle: 'italic', + }, + }, + { + types: ['class-name'], + style: { + color: 'rgb(255, 203, 139)', + }, + }, + { + types: ['tag', 'operator', 'keyword'], + style: { + color: '#66d9ef', + }, + }, + { + types: ['boolean'], + style: { + color: 'rgb(255, 88, 116)', + }, + }, + { + types: ['property'], + style: { + color: 'rgb(128, 203, 196)', + }, + }, + { + types: ['namespace'], + style: { + color: 'rgb(178, 204, 214)', + }, + }, + ], +} + +export default theme \ No newline at end of file From 8ff2cd9ee833f3fb02c280b0a0b95e80ab130a3b Mon Sep 17 00:00:00 2001 From: Yakko Majuri <38760734+yakkomajuri@users.noreply.github.com> Date: Wed, 17 Feb 2021 11:35:27 +0000 Subject: [PATCH 2/2] update styles --- src/themes/okaidia.js | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/src/themes/okaidia.js b/src/themes/okaidia.js index 8b1b609..99e118a 100644 --- a/src/themes/okaidia.js +++ b/src/themes/okaidia.js @@ -27,7 +27,7 @@ var theme: PrismTheme = { }, }, { - types: ['inserted', 'attr-name'], + types: ['inserted'], style: { color: 'rgb(173, 219, 103)', fontStyle: 'italic', @@ -59,7 +59,7 @@ var theme: PrismTheme = { }, }, { - types: ['builtin', 'char', 'constant', 'function'], + types: ['builtin', 'char', 'constant', 'function', 'class-name'], style: { color: '#e6db74', }, @@ -78,36 +78,49 @@ var theme: PrismTheme = { }, }, { - types: ['class-name'], + types: ['tag', 'operator', 'keyword'], style: { - color: 'rgb(255, 203, 139)', + color: '#66d9ef', }, }, { - types: ['tag', 'operator', 'keyword'], + types: ['boolean'], style: { - color: '#66d9ef', + color: '#ae81ff', }, }, { - types: ['boolean'], + types: ['namespace'], style: { - color: 'rgb(255, 88, 116)', + color: 'rgb(178, 204, 214)', + opacity: 0.7, }, }, { - types: ['property'], + types: ['tag', 'property'], style: { - color: 'rgb(128, 203, 196)', + color: '#f92672', }, }, { - types: ['namespace'], + types: ['attr-name'], style: { - color: 'rgb(178, 204, 214)', + color: '#a6e22e !important', + }, + }, + { + types: ['doctype'], + style: { + color: '#8292a2', + }, + }, + { + types: ['rule'], + style: { + color: '#e6db74', }, }, ], } -export default theme \ No newline at end of file +export default theme