feat: improve editor

This commit is contained in:
Anthony Fu 2022-11-30 12:50:29 +08:00
parent b784264d96
commit ccf6a17f72
12 changed files with 68 additions and 24 deletions

View file

@ -67,9 +67,15 @@ body {
p {
--at-apply: my-2;
}
code {
--at-apply: bg-code text-code px1 py0.5 rounded text-sm;
}
pre code {
--at-apply: text-base bg-transparent px0 py0 rounded-none;
}
.code-block {
--at-apply: bg-code text-0.9rem p3 mt-2 rounded overflow-auto leading-1.6em;
--at-apply: font-mono bg-code text-base p3 mt-2 rounded overflow-auto leading-1.6em;
.shiki {
background: transparent !important;
@ -78,15 +84,7 @@ body {
}
.content-editor {
--at-apply: 'outline-none flex-1';
pre {
--at-apply: font-mono bg-code rounded px3 py2;
code {
--at-apply: bg-transparent text-0.8rem p0;
}
}
--at-apply: outline-none flex-1;
}
.content-editor.content-rich {

View file

@ -2,13 +2,17 @@
--c-primary: #EA9E44;
--c-primary-active: #C16929;
--c-border: #88888820;
--c-bg-base: #fff;
--c-bg-active: #f6f6f6;
--c-bg-code: #00000006;
--c-bg-selection: #8885;
--c-text-base: #232323;
--c-text-code: #7ca72f;
--c-text-secondary: #686868;
--c-text-secondary-light: #919191;
--c-bg-btn-disabled: #a1a1a1;
--c-text-btn-disabled: #fff;
--c-text-btn: #232323;
@ -18,9 +22,12 @@
--c-bg-base: #111;
--c-bg-active: #191919;
--c-bg-code: #ffffff06;
--c-text-base: #fff;
--c-text-code: #90be3d;
--c-text-secondary: #888;
--c-text-secondary-light: #686868;
--c-bg-btn-disabled: #2a2a2a;
--c-text-btn-disabled: #919191;
}