Skip to content

Commit 8c4c169

Browse files
committed
feat: theme
1 parent 0f433eb commit 8c4c169

File tree

6 files changed

+49
-28
lines changed

6 files changed

+49
-28
lines changed

src/components/Editor/CodeMirror/styles.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
--cm-ttc-c-track: white;
3636
}
3737

38-
html[data-kb-theme="dark"] {
38+
html[class="dark"] {
3939
--cm-scheme: dark;
4040
--cm-foreground: #d4cfbf80;
41-
--cm-background: #121212;
4241
--cm-tooltip-background: #121212;
42+
--cm-background: #121212;
4343
--cm-comment: #758575;
4444
--cm-string: #d48372;
4545
--cm-keyword: #4d9375;
@@ -54,6 +54,9 @@ html[data-kb-theme="dark"] {
5454
--cm-line-highlight-background: #4d4d4d29;
5555
--cm-line-highlight-border: #3a3a3a80;
5656
--cm-selection-background: #242424;
57+
/* scrollbars colors */
58+
--cm-ttc-c-thumb: #3d3d3d;
59+
--cm-ttc-c-track: #000;
5760
}
5861

5962
.highlighted,

src/components/Output/Preview/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { useImportMap } from "@/hooks/impormap"
55
import logger from "@/utils/logger"
66
import basicTemplate from "./basic.html?raw"
77

8+
import "./styles.css"
9+
810
interface Props {
911
className?: string
1012
code: string
@@ -72,7 +74,6 @@ const Preview: React.FC<Props> = ({ code, className }) => {
7274
<iframe
7375
ref={iframeRef}
7476
title="preview"
75-
style={{ width: "100%", height: "100%", border: "none" }}
7677
sandbox="allow-forms allow-modals allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation"
7778
/>
7879
</div>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.react-repl-iframe-container > iframe {
2+
width: 100%;
3+
height: 100%;
4+
border: none;
5+
background-color: #fff;
6+
}

src/components/Output/styles.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@
2424
color: var(--repl-text-secondary);
2525
font-weight: bold;
2626
border-radius: 3px;
27+
border: 1px solid transparent;
2728
}
2829

2930
.repl-tab-button:hover,
3031
.repl-tab-button.active {
31-
background-color: var(--repl-primary-hover);
32-
color: var(--repl-bg-primary);
32+
background-color: var(--repl-hover);
3333
}
3434

3535
.repl-tab-button.active {
36-
color: var(--repl-bg-primary);
37-
background-color: var(--repl-primary-color);
36+
color: var(--repl-text-primary);
37+
background-color: var(--repl-hover);
38+
border-color: var(--repl-border-color);
3839
}
3940

4041
.repl-output-content {

src/components/SplitPanel/styles.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@
3030
flex-shrink: 0;
3131
position: relative;
3232
z-index: 10;
33+
34+
transition: transform 0.2s ease-in-out;
3335
}
3436

3537
.repl-split-panel-divider:hover,
3638
.repl-split-panel-divider:active {
37-
background-color: var(--repl-primary-color);
39+
transform: scale(2);
3840
}

src/repl.css

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
1-
.react-repl {
2-
height: 100%;
3-
width: 100%;
4-
margin: 0px;
5-
}
6-
7-
#gtx-trans,
8-
grammarly-extension,
9-
deepl-inline-translate,
10-
grammarly-popups,
11-
deepl-inline-popup,
12-
grammarly-desktop-integration {
13-
display: none !important;
14-
}
15-
161
:root {
172
/* Base Colors */
18-
--repl-primary-color: #1e9dbc;
19-
--repl-primary-hover: #58c4dc;
3+
--repl-primary-color: #ffffff;
204

215
/* UI Colors */
226
--repl-divider-color: #e0e0e0;
7+
--repl-border-color: #e4e4e7;
8+
--repl-hover: #f4f4f5;
239

2410
/* Text Colors */
25-
--repl-text-primary: #393a34;
11+
--repl-text-primary: #000;
2612
--repl-text-secondary: #858585;
2713

2814
/* Background Colors */
2915
--repl-bg-primary: #fdfdfd;
30-
--repl-bg-secondary: #f5f5f5;
31-
--repl-bg-hover: rgba(0, 0, 0, 0.04);
16+
}
17+
18+
.dark {
19+
/* Base Colors */
20+
--repl-primary-color: #09090b;
21+
22+
/* UI Colors */
23+
--repl-divider-color: #27272a;
24+
--repl-border-color: #27272a;
25+
--repl-hover: #09090b;
26+
27+
/* Text Colors */
28+
--repl-text-primary: #fff;
29+
--repl-text-secondary: #858585;
30+
31+
/* Background Colors */
32+
--repl-bg-primary: #09090b;
33+
}
34+
35+
.react-repl {
36+
height: 100%;
37+
width: 100%;
38+
margin: 0px;
39+
background-color: var(--repl-bg-primary);
3240
}

0 commit comments

Comments
 (0)