From 7fced3c47aafee225709708cae246d06c0f78b21 Mon Sep 17 00:00:00 2001 From: zjxxxxxxxxx <43126836+zjxxxxxxxxx@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:43:02 +0800 Subject: [PATCH] feat: change font styles (#88) --- .changeset/nasty-forks-drop.md | 5 ++++ .changeset/tender-elephants-guess.md | 5 ++++ .../src/elements/defineInspectElement.ts | 2 +- .../src/elements/defineTooltipElement.ts | 3 +- .../client/src/elements/defineTreeElement.ts | 22 ++++++++------ .../client/src/resolve/createVueResolver.ts | 30 +++++++++---------- packages/client/src/resolve/util.ts | 3 +- packages/shared/src/type.ts | 4 +++ 8 files changed, 46 insertions(+), 28 deletions(-) create mode 100644 .changeset/nasty-forks-drop.md create mode 100644 .changeset/tender-elephants-guess.md diff --git a/.changeset/nasty-forks-drop.md b/.changeset/nasty-forks-drop.md new file mode 100644 index 00000000..48a11e8f --- /dev/null +++ b/.changeset/nasty-forks-drop.md @@ -0,0 +1,5 @@ +--- +'@open-editor/client': patch +--- + +change font styles diff --git a/.changeset/tender-elephants-guess.md b/.changeset/tender-elephants-guess.md new file mode 100644 index 00000000..a461c9ee --- /dev/null +++ b/.changeset/tender-elephants-guess.md @@ -0,0 +1,5 @@ +--- +'@open-editor/shared': patch +--- + +add type uilt 'isBol' diff --git a/packages/client/src/elements/defineInspectElement.ts b/packages/client/src/elements/defineInspectElement.ts index c9cd0fd7..c06b1741 100644 --- a/packages/client/src/elements/defineInspectElement.ts +++ b/packages/client/src/elements/defineInspectElement.ts @@ -14,7 +14,7 @@ export interface HTMLInspectElement extends HTMLElement {} const CSS = ` * { box-sizing: content-box; - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + font-family: Menlo, Monaco, 'Courier New', monospace; line-height: 1.5; font-weight: 400; } diff --git a/packages/client/src/elements/defineTooltipElement.ts b/packages/client/src/elements/defineTooltipElement.ts index 2d9b6f07..83b256a7 100644 --- a/packages/client/src/elements/defineTooltipElement.ts +++ b/packages/client/src/elements/defineTooltipElement.ts @@ -30,8 +30,9 @@ const CSS = ` will-change: visibility, top, left; } .element { - color: var(--element); font-size: 14px; + font-weight: 400; + color: var(--element); } .component { font-size: 16px; diff --git a/packages/client/src/elements/defineTreeElement.ts b/packages/client/src/elements/defineTreeElement.ts index 3849cbda..632d888d 100644 --- a/packages/client/src/elements/defineTreeElement.ts +++ b/packages/client/src/elements/defineTreeElement.ts @@ -49,9 +49,9 @@ const CSS = ` } .line { position: absolute; - left: 18px; + left: 17px; top: 22px; - opacity: 0.4; + opacity: 0.1; width: 1px; height: calc(100% - 44px); background: var(--green); @@ -66,11 +66,14 @@ const CSS = ` } .title { padding-bottom: 12px; + font-size: 16px; + font-weight: 500; color: var(--green); } .element { - color: var(--element); font-size: 14px; + font-weight: 400; + color: var(--element); } .empty { color: var(--red); @@ -82,7 +85,7 @@ const CSS = ` opacity: 1; } .tag[data-file]:hover ~ .line { - opacity: 0.8; + opacity: 0.6; } .msg { font-size: 14px; @@ -90,17 +93,18 @@ const CSS = ` text-decoration: underline; } .name { - font-size: 14px; + font-size: 16px; + font-weight: 500; color: var(--green); } .file { - font-size: 12px; - font-weight: 300; + font-size: 14px; + font-weight: 200; color: var(--cyan); } .name, .file { - opacity: 0.6; + opacity: 0.3; } `; @@ -231,7 +235,7 @@ export function defineTreeElement() { if (!withFile) { return `