-
-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support no default color for dual themes, #6
- Loading branch information
Showing
11 changed files
with
180 additions
and
23 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
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,56 @@ | ||
|
||
<style> | ||
.shiki { | ||
padding: 0.5em; | ||
border-radius: 0.25em; | ||
} | ||
|
||
.shiki { | ||
background-color: var(--s-light-bg); | ||
color: var(--s-light); | ||
} | ||
.shiki span { | ||
color: var(--s-light) | ||
} | ||
|
||
[data-theme="dark"] .shiki { | ||
background-color: var(--s-dark-bg); | ||
color: var(--s-dark); | ||
} | ||
[data-theme="dark"] .shiki span { | ||
color: var(--s-dark); | ||
} | ||
|
||
[data-theme="nord"] .shiki { | ||
background-color: var(--s-nord-bg); | ||
color: var(--s-nord); | ||
} | ||
[data-theme="nord"] .shiki span { | ||
color: var(--s-nord); | ||
} | ||
|
||
[data-theme="min-dark"] .shiki { | ||
background-color: var(--s-min-dark-bg); | ||
color: var(--s-min-dark); | ||
} | ||
[data-theme="min-dark"] .shiki span { | ||
color: var(--s-min-dark); | ||
} | ||
|
||
[data-theme="min-light"] .shiki { | ||
background-color: var(--s-min-light-bg); | ||
color: var(--s-min-light); | ||
} | ||
[data-theme="min-light"] .shiki span { | ||
color: var(--s-min-light); | ||
} | ||
</style> | ||
<script> | ||
const themes = ['light', 'dark', 'nord', 'min-dark', 'min-light'] | ||
|
||
function toggleTheme() { | ||
document.body.dataset.theme = themes[(Math.max(themes.indexOf(document.body.dataset.theme), 0) + 1) % themes.length] | ||
} | ||
</script> | ||
<button onclick="toggleTheme()">Toggle theme</button> | ||
<pre class="shiki shiki-dual-themes vitesse-light vitesse-dark nord min-dark min-light" style="--s-light:#393a34;--s-dark:#dbd7caee;--s-nord:#d8dee9ff;--s-min-dark:#b392f0;--s-min-light:#24292eff;--s-light-bg:#ffffff;--s-dark-bg:#121212;--s-nord-bg:#2e3440ff;--s-min-dark-bg:#1f1f1f;--s-min-light-bg:#ffffff" tabindex="0"><code><span class="line"><span style="--s-light:#B07D48;--s-dark:#BD976A;--s-nord:#D8DEE9;--s-min-dark:#79B8FF;--s-min-light:#1976D2">console</span><span style="--s-light:#999999;--s-dark:#666666;--s-nord:#ECEFF4;--s-min-dark:#B392F0;--s-min-light:#6F42C1">.</span><span style="--s-light:#59873A;--s-dark:#80A665;--s-nord:#88C0D0;--s-min-dark:#B392F0;--s-min-light:#6F42C1">log</span><span style="--s-light:#999999;--s-dark:#666666;--s-nord:#D8DEE9FF;--s-min-dark:#B392F0;--s-min-light:#24292EFF">(</span><span style="--s-light:#B5695999;--s-dark:#C98A7D99;--s-nord:#ECEFF4;--s-min-dark:#FFAB70;--s-min-light:#22863A">"</span><span style="--s-light:#B56959;--s-dark:#C98A7D;--s-nord:#A3BE8C;--s-min-dark:#FFAB70;--s-min-light:#22863A">hello</span><span style="--s-light:#B5695999;--s-dark:#C98A7D99;--s-nord:#ECEFF4;--s-min-dark:#FFAB70;--s-min-light:#22863A">"</span><span style="--s-light:#999999;--s-dark:#666666;--s-nord:#D8DEE9FF;--s-min-dark:#B392F0;--s-min-light:#24292EFF">)</span></span></code></pre> |
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