This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a25241
commit 48fc224
Showing
14 changed files
with
464 additions
and
528 deletions.
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
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
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
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 |
---|---|---|
@@ -1,153 +1,160 @@ | ||
body.theme-dark { | ||
{$contentClass} { | ||
code { | ||
background: var(--grey12); | ||
} | ||
} | ||
/** | ||
* One Light theme for prism.js | ||
* Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax | ||
* Copied from https://github.com/PrismJS/prism-themes/blob/master/themes/prism-one-dark.css | ||
*/ | ||
@require './helper'; | ||
|
||
.theme-dark { | ||
color-helper($codeColor: #abb2bf, $codeBgColor: #282c34); | ||
} | ||
|
||
/** | ||
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML | ||
* Based on https://github.com/chriskempson/tomorrow-theme | ||
* @author Rose Pritchard | ||
*/ | ||
code[class*='language-'], pre[class*='language-'] { | ||
color: #ccc; | ||
background: none; | ||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; | ||
font-size: 1em; | ||
text-align: left; | ||
white-space: pre; | ||
word-spacing: normal; | ||
word-break: normal; | ||
word-wrap: normal; | ||
-moz-tab-size: 4; | ||
-o-tab-size: 4; | ||
tab-size: 4; | ||
-webkit-hyphens: none; | ||
-moz-hyphens: none; | ||
-ms-hyphens: none; | ||
hyphens: none; | ||
} | ||
code[class*='language-'], pre[class*='language-'] { | ||
text-shadow: 0 1px rgb(0 0 0 / 30%); | ||
// tab size | ||
-moz-tab-size: 2; | ||
-o-tab-size: 2; | ||
tab-size: 2; | ||
|
||
/* Code blocks */ | ||
pre[class*='language-'] { | ||
overflow: auto; | ||
/* Print */ | ||
@media print { | ||
text-shadow: none; | ||
} | ||
|
||
:not(pre) > code[class*='language-'], pre[class*='language-'] { | ||
background: #2d2d2d; | ||
// Selection | ||
&::selection, ::selection { | ||
background: #3e4451; | ||
color: inherit; | ||
text-shadow: none; | ||
} | ||
} | ||
|
||
/* Inline code */ | ||
:not(pre) > code[class*='language-'] { | ||
padding: 0.1em; | ||
border-radius: 0.3em; | ||
white-space: normal; | ||
} | ||
.token.comment, .token.prolog, .token.cdata { | ||
color: #5c6370; | ||
} | ||
|
||
.token.comment, .token.block-comment, .token.prolog, .token.doctype, .token.cdata { | ||
color: #999; | ||
} | ||
.token.doctype, .token.punctuation, .token.entity { | ||
color: #abb2bf; | ||
} | ||
|
||
.token.punctuation { | ||
color: #ccc; | ||
} | ||
.token.attr-name, .token.class-name, .token.boolean, .token.constant, .token.number, .token.atrule { | ||
color: #d19a66; | ||
} | ||
|
||
.token.tag, .token.attr-name, .token.namespace, .token.deleted { | ||
color: #e2777a; | ||
} | ||
.token.keyword { | ||
color: #c678dd; | ||
} | ||
|
||
.token.function-name { | ||
color: #6196cc; | ||
} | ||
.token.property, .token.tag, .token.symbol, .token.deleted, .token.important { | ||
color: #e06c75; | ||
} | ||
|
||
.token.selector, .token.string, .token.char, .token.builtin, .token.inserted, .token.regex, .token.attr-value, .token.attr-value > .token.punctuation { | ||
color: #98c379; | ||
} | ||
|
||
.token.variable, .token.operator, .token.function { | ||
color: #61afef; | ||
} | ||
|
||
.token.url { | ||
color: #56b6c2; | ||
} | ||
|
||
/* HTML overrides */ | ||
.token.attr-value > .token.punctuation.attr-equals, .token.special-attr > .token.attr-value > .token.value.css { | ||
color: #abb2bf; | ||
} | ||
|
||
.token.boolean, .token.number, .token.function { | ||
color: #f08d49; | ||
/* CSS overrides */ | ||
.language-css .token.selector { | ||
color: #e06c75; | ||
} | ||
|
||
.language-css .token.property { | ||
color: #abb2bf; | ||
} | ||
|
||
.language-css .token.function, .language-css .token.url > .token.function { | ||
color: #56b6c2; | ||
} | ||
|
||
.language-css .token.url > .token.string.url { | ||
color: #98c379; | ||
} | ||
|
||
.language-css .token.important, .language-css .token.atrule .token.rule { | ||
color: #c678dd; | ||
} | ||
|
||
/* JS overrides */ | ||
.language-javascript .token.operator { | ||
color: #c678dd; | ||
} | ||
|
||
// stylelint-disable selector-max-compound-selectors | ||
.language-javascript { | ||
.token.template-string, > .token.interpolation, > .token.interpolation-punctuation.punctuation { | ||
color: #be5046; | ||
} | ||
|
||
.token.property, .token.class-name, .token.constant, .token.symbol { | ||
color: #f8c555; | ||
/* JSON overrides */ | ||
.language-json .token.operator { | ||
color: #abb2bf; | ||
} | ||
|
||
.token.selector, .token.important, .token.atrule, .token.keyword, .token.builtin { | ||
color: #cc99cd; | ||
.language-json .token.null.keyword { | ||
color: #d19a66; | ||
} | ||
|
||
.token.string, .token.char, .token.attr-value, .token.regex, .token.variable { | ||
color: #7ec699; | ||
/* MD overrides */ | ||
.language-markdown .token.url, .language-markdown .token.url > .token.operator, .language-markdown .token.url-reference.url > .token.string { | ||
color: #abb2bf; | ||
} | ||
|
||
.token.operator, .token.entity, .token.url { | ||
color: #67cdcc; | ||
.language-markdown .token.url > .token.content { | ||
color: #61afef; | ||
} | ||
|
||
.token.important, .token.bold { | ||
font-weight: bold; | ||
.language-markdown .token.url > .token.url, .language-markdown .token.url-reference.url { | ||
color: #56b6c2; | ||
} | ||
|
||
.token.italic { | ||
.language-markdown .token.blockquote.punctuation, .language-markdown .token.hr.punctuation { | ||
color: #5c6370; | ||
font-style: italic; | ||
} | ||
|
||
.token.entity { | ||
cursor: help; | ||
.language-markdown .token.code-snippet { | ||
color: #98c379; | ||
} | ||
|
||
.token.inserted { | ||
color: green; | ||
.language-markdown .token.bold .token.content { | ||
color: #d19a66; | ||
} | ||
|
||
// hightlight | ||
div[class*='language-'] { | ||
.highlight-lines { | ||
.highlighted { | ||
background: darken(saturate($darkCodeBgColor, 10%), 25%); | ||
} | ||
} | ||
|
||
pre, pre[class*='language-'] { | ||
background: transparent; | ||
} | ||
|
||
&::before { | ||
color: rgba(255, 255, 255, 0.4); | ||
} | ||
|
||
&.line-numbers-mode { | ||
.highlight-lines .highlighted:before { | ||
background: darken(saturate($darkCodeBgColor, 10%), 25%); | ||
} | ||
|
||
.line-numbers-wrapper { | ||
color: rgba(255, 255, 255, 0.3); | ||
} | ||
|
||
&::after { | ||
border-right: 1px solid darken(saturate($darkCodeBgColor, 10%), 35%); | ||
} | ||
} | ||
.language-markdown .token.italic .token.content { | ||
color: #c678dd; | ||
} | ||
|
||
.code-group-nav { | ||
background-color: darken(saturate($darkCodeBgColor, 10%), 35%); | ||
.language-markdown .token.strike .token.content, .language-markdown .token.strike .token.punctuation, .language-markdown .token.list.punctuation, .language-markdown .token.title.important > .token.punctuation { | ||
color: #e06c75; | ||
} | ||
|
||
.code-group-nav-tab { | ||
&:hover { | ||
background-color: darken(saturate($darkCodeBgColor, 10%), 5%); | ||
} | ||
/* General */ | ||
.token.bold { | ||
font-weight: bold; | ||
} | ||
|
||
&.active { | ||
border-bottom: 0; | ||
background-color: $darkCodeBgColor; | ||
.token.comment, .token.italic { | ||
font-style: italic; | ||
} | ||
|
||
&:before { | ||
background: radial-gradient(12px at left top, transparent 50%, $darkCodeBgColor 50%); | ||
} | ||
.token.entity { | ||
cursor: help; | ||
} | ||
|
||
&:after { | ||
background: radial-gradient(12px at right top, transparent 50%, $darkCodeBgColor 50%); | ||
} | ||
} | ||
.token.namespace { | ||
opacity: 0.8; | ||
} | ||
} |
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,7 @@ | ||
color-helper($codeColor, $codeBgColor) { | ||
--code-color: $codeColor; | ||
--code-line-color: alpha($codeColor, 0.67); | ||
--code-bg-color: $codeBgColor; | ||
--code-border-color: darken(saturate($codeBgColor, 20%), 10%); | ||
--code-highlight-line-color: darken(saturate($codeBgColor, 10%), 5%); | ||
} |
Oops, something went wrong.