-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from mrousavy/feat/one-themes
feat: Add One Light and One Dark Themes
- Loading branch information
Showing
5 changed files
with
229 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"prism-react-renderer": minor | ||
--- | ||
|
||
Added oneDark and oneLight themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/* | ||
Adapted from the Prism One Dark Theme | ||
https://github.com/PrismJS/prism-themes/blob/master/themes/prism-one-dark.css | ||
Created by Marc Rousavy (@mrousavy) on 26.9.2023 | ||
*/ | ||
import type { PrismTheme } from "../types" | ||
|
||
const theme: PrismTheme = { | ||
plain: { | ||
backgroundColor: "hsl(220, 13%, 18%)", | ||
color: "hsl(220, 14%, 71%)", | ||
textShadow: "0 1px rgba(0, 0, 0, 0.3)", | ||
}, | ||
styles: [ | ||
{ | ||
types: ["comment", "prolog", "cdata"], | ||
style: { | ||
color: "hsl(220, 10%, 40%)", | ||
}, | ||
}, | ||
{ | ||
types: ["doctype", "punctuation", "entity"], | ||
style: { | ||
color: "hsl(220, 14%, 71%)", | ||
}, | ||
}, | ||
{ | ||
types: [ | ||
"attr-name", | ||
"class-name", | ||
"maybe-class-name", | ||
"boolean", | ||
"constant", | ||
"number", | ||
"atrule", | ||
], | ||
style: { color: "hsl(29, 54%, 61%)" }, | ||
}, | ||
{ | ||
types: ["keyword"], | ||
style: { color: "hsl(286, 60%, 67%)" }, | ||
}, | ||
{ | ||
types: ["property", "tag", "symbol", "deleted", "important"], | ||
style: { | ||
color: "hsl(355, 65%, 65%)", | ||
}, | ||
}, | ||
|
||
{ | ||
types: [ | ||
"selector", | ||
"string", | ||
"char", | ||
"builtin", | ||
"inserted", | ||
"regex", | ||
"attr-value", | ||
], | ||
style: { | ||
color: "hsl(95, 38%, 62%)", | ||
}, | ||
}, | ||
{ | ||
types: ["variable", "operator", "function"], | ||
style: { | ||
color: "hsl(207, 82%, 66%)", | ||
}, | ||
}, | ||
{ | ||
types: ["url"], | ||
style: { | ||
color: "hsl(187, 47%, 55%)", | ||
}, | ||
}, | ||
{ | ||
types: ["deleted"], | ||
style: { | ||
textDecorationLine: "line-through", | ||
}, | ||
}, | ||
{ | ||
types: ["inserted"], | ||
style: { | ||
textDecorationLine: "underline", | ||
}, | ||
}, | ||
{ | ||
types: ["italic"], | ||
style: { | ||
fontStyle: "italic", | ||
}, | ||
}, | ||
{ | ||
types: ["important", "bold"], | ||
style: { | ||
fontWeight: "bold", | ||
}, | ||
}, | ||
{ | ||
types: ["important"], | ||
style: { | ||
color: "hsl(220, 14%, 71%)", | ||
}, | ||
}, | ||
], | ||
} | ||
|
||
export default theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/* | ||
Adapted from the Prism One Light Theme | ||
https://github.com/PrismJS/prism-themes/blob/master/themes/prism-one-light.css | ||
Created by Marc Rousavy (@mrousavy) on 26.9.2023 | ||
*/ | ||
import type { PrismTheme } from "../types" | ||
|
||
const theme: PrismTheme = { | ||
plain: { | ||
backgroundColor: "hsl(230, 1%, 98%)", | ||
color: "hsl(230, 8%, 24%)", | ||
}, | ||
styles: [ | ||
{ | ||
types: ["comment", "prolog", "cdata"], | ||
style: { | ||
color: "hsl(230, 4%, 64%)", | ||
}, | ||
}, | ||
{ | ||
types: ["doctype", "punctuation", "entity"], | ||
style: { | ||
color: "hsl(230, 8%, 24%)", | ||
}, | ||
}, | ||
{ | ||
types: [ | ||
"attr-name", | ||
"class-name", | ||
"boolean", | ||
"constant", | ||
"number", | ||
"atrule", | ||
], | ||
style: { | ||
color: "hsl(35, 99%, 36%)", | ||
}, | ||
}, | ||
{ | ||
types: ["keyword"], | ||
style: { | ||
color: "hsl(301, 63%, 40%)", | ||
}, | ||
}, | ||
|
||
{ | ||
types: ["property", "tag", "symbol", "deleted", "important"], | ||
style: { | ||
color: "hsl(5, 74%, 59%)", | ||
}, | ||
}, | ||
{ | ||
types: [ | ||
"selector", | ||
"string", | ||
"char", | ||
"builtin", | ||
"inserted", | ||
"regex", | ||
"attr-value", | ||
"punctuation", | ||
], | ||
style: { | ||
color: "hsl(119, 34%, 47%)", | ||
}, | ||
}, | ||
{ | ||
types: ["variable", "operator", "function"], | ||
style: { | ||
color: "hsl(221, 87%, 60%)", | ||
}, | ||
}, | ||
{ | ||
types: ["url"], | ||
style: { | ||
color: "hsl(198, 99%, 37%)", | ||
}, | ||
}, | ||
{ | ||
types: ["deleted"], | ||
style: { | ||
textDecorationLine: "line-through", | ||
}, | ||
}, | ||
{ | ||
types: ["inserted"], | ||
style: { | ||
textDecorationLine: "underline", | ||
}, | ||
}, | ||
{ | ||
types: ["italic"], | ||
style: { | ||
fontStyle: "italic", | ||
}, | ||
}, | ||
{ | ||
types: ["important", "bold"], | ||
style: { | ||
fontWeight: "bold", | ||
}, | ||
}, | ||
{ | ||
types: ["important"], | ||
style: { | ||
color: "hsl(230, 8%, 24%)", | ||
}, | ||
}, | ||
], | ||
} | ||
|
||
export default theme |