Skip to content

Commit 534bd62

Browse files
committed
style: Modify style.
1 parent 1720ebd commit 534bd62

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/style/index.less

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
@media (prefers-color-scheme: dark) {
44
.@{w-textarea} {
5-
color-scheme: dark;
5+
--color-fg-default: #c9d1d9;
6+
--color-canvas-subtle: #161b22;
67
--color-prettylights-syntax-comment: #8b949e;
78
--color-prettylights-syntax-entity-tag: #7ee787;
89
--color-prettylights-syntax-entity: #d2a8ff;
@@ -16,7 +17,8 @@
1617

1718
@media (prefers-color-scheme: light) {
1819
.@{w-textarea} {
19-
color-scheme: light;
20+
--color-fg-default: #24292f;
21+
--color-canvas-subtle: #161b22;
2022
--color-prettylights-syntax-comment: #6e7781;
2123
--color-prettylights-syntax-entity-tag: #116329;
2224
--color-prettylights-syntax-entity: #8250df;
@@ -31,7 +33,8 @@
3133
[data-color-mode*='dark'] .@{w-textarea},
3234
[data-color-mode*='dark'] .@{w-textarea}-var,
3335
body[data-color-mode*='dark'] {
34-
color-scheme: dark;
36+
--color-fg-default: #c9d1d9;
37+
--color-canvas-subtle: #161b22;
3538
--color-prettylights-syntax-comment: #8b949e;
3639
--color-prettylights-syntax-entity-tag: #7ee787;
3740
--color-prettylights-syntax-entity: #d2a8ff;
@@ -45,7 +48,8 @@ body[data-color-mode*='dark'] {
4548
[data-color-mode*='light'] .@{w-textarea},
4649
[data-color-mode*='light'] .@{w-textarea}-var,
4750
body[data-color-mode*='light'] {
48-
color-scheme: light;
51+
--color-fg-default: #24292f;
52+
--color-canvas-subtle: #f6f8fa;
4953
--color-prettylights-syntax-comment: #6e7781;
5054
--color-prettylights-syntax-entity-tag: #116329;
5155
--color-prettylights-syntax-entity: #8250df;
@@ -59,6 +63,9 @@ body[data-color-mode*='light'] {
5963
.@{w-textarea} {
6064
font-family: inherit;
6165
font-size: 12px;
66+
color: var(--color-fg-default);
67+
background-color: var(--color-canvas-subtle);
68+
color: var(--color-fg-default);
6269
&-text,
6370
&-preview {
6471
min-height: 16px;

website/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ const App: React.FC = () => {
6868
minHeight={80}
6969
placeholder={`Please enter ${(language || '').toLocaleUpperCase()} code.`}
7070
style={{
71-
backgroundColor: 'var(--color-canvas-subtle)',
7271
fontSize: 14,
7372
fontFamily: 'ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace',
7473
}}

0 commit comments

Comments
 (0)