From a10d2261bca98457c16410e9fb56a6a73c8e90bf Mon Sep 17 00:00:00 2001 From: pengbo43 Date: Wed, 31 Jan 2024 16:58:06 +0800 Subject: [PATCH 1/6] chore: overlay style opt --- packages/vite/src/client/overlay.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/vite/src/client/overlay.ts b/packages/vite/src/client/overlay.ts index cb9ec0fefe6f8b..da665d302ad161 100644 --- a/packages/vite/src/client/overlay.ts +++ b/packages/vite/src/client/overlay.ts @@ -44,10 +44,10 @@ const template = /*html*/ ` .window { font-family: var(--monospace); line-height: 1.5; - width: 800px; + width: 80vw; color: var(--window-color); margin: 30px auto; - padding: 25px 40px; + padding: 2.5vh 4vw; position: relative; background: var(--window-background); border-radius: 6px 6px 8px 8px; @@ -113,6 +113,8 @@ pre.frame { .stack { font-size: 13px; color: var(--dim); + white-space: pre-wrap; + word-break: break-all; } .tip { From 7abace7fb5caa50391f3061568a6fe56440ab36a Mon Sep 17 00:00:00 2001 From: pengbo43 Date: Thu, 1 Feb 2024 11:45:48 +0800 Subject: [PATCH 2/6] chore: @media screen for style --- packages/vite/src/client/overlay.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/vite/src/client/overlay.ts b/packages/vite/src/client/overlay.ts index da665d302ad161..819a93d209d638 100644 --- a/packages/vite/src/client/overlay.ts +++ b/packages/vite/src/client/overlay.ts @@ -44,10 +44,10 @@ const template = /*html*/ ` .window { font-family: var(--monospace); line-height: 1.5; - width: 80vw; + width: 800px; color: var(--window-color); margin: 30px auto; - padding: 2.5vh 4vw; + padding: 25px 40px; position: relative; background: var(--window-background); border-radius: 6px 6px 8px 8px; @@ -113,8 +113,6 @@ pre.frame { .stack { font-size: 13px; color: var(--dim); - white-space: pre-wrap; - word-break: break-all; } .tip { @@ -136,6 +134,17 @@ code { cursor: pointer; } +@media screen and (max-width: 1000px) { + .window { + width: 80vw; + padding: 2.5vh 4vh; + } + .stack { + white-space: pre-wrap; + word-break: break-all; + } +} + kbd { line-height: 1.5; font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; From 760e87206fbf988f9c3dd161c0e62c4905985384 Mon Sep 17 00:00:00 2001 From: pengbo43 Date: Thu, 1 Feb 2024 12:29:15 +0800 Subject: [PATCH 3/6] fix: vh to vw --- packages/vite/src/client/overlay.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/client/overlay.ts b/packages/vite/src/client/overlay.ts index 819a93d209d638..67a2f4ec90c495 100644 --- a/packages/vite/src/client/overlay.ts +++ b/packages/vite/src/client/overlay.ts @@ -137,7 +137,7 @@ code { @media screen and (max-width: 1000px) { .window { width: 80vw; - padding: 2.5vh 4vh; + padding: 2.5vh 4vw; } .stack { white-space: pre-wrap; From 9533827997b5c1141e0e6c1bae86be3d32da1dfe Mon Sep 17 00:00:00 2001 From: pengbo43 Date: Wed, 21 Feb 2024 16:15:53 +0800 Subject: [PATCH 4/6] chore: change window to border-box & remove media query --- packages/vite/src/client/overlay.ts | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/vite/src/client/overlay.ts b/packages/vite/src/client/overlay.ts index 67a2f4ec90c495..17dbf00de7a288 100644 --- a/packages/vite/src/client/overlay.ts +++ b/packages/vite/src/client/overlay.ts @@ -44,10 +44,11 @@ const template = /*html*/ ` .window { font-family: var(--monospace); line-height: 1.5; - width: 800px; + max-width: 80vw; color: var(--window-color); + box-sizing: border-box; margin: 30px auto; - padding: 25px 40px; + padding: 2.5vh 4vw; position: relative; background: var(--window-background); border-radius: 6px 6px 8px 8px; @@ -134,17 +135,6 @@ code { cursor: pointer; } -@media screen and (max-width: 1000px) { - .window { - width: 80vw; - padding: 2.5vh 4vw; - } - .stack { - white-space: pre-wrap; - word-break: break-all; - } -} - kbd { line-height: 1.5; font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; From c438e3c07a26afe401493c02d6d57f9160d02257 Mon Sep 17 00:00:00 2001 From: pengbo43 Date: Sun, 25 Feb 2024 09:34:00 +0800 Subject: [PATCH 5/6] chore: stack wrap --- packages/vite/src/client/overlay.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/vite/src/client/overlay.ts b/packages/vite/src/client/overlay.ts index 17dbf00de7a288..11c3ee3d5510df 100644 --- a/packages/vite/src/client/overlay.ts +++ b/packages/vite/src/client/overlay.ts @@ -114,6 +114,8 @@ pre.frame { .stack { font-size: 13px; color: var(--dim); + white-space: pre-wrap; + word-break: break-all; } .tip { From 19390558924692db0137aaa8d9004b9ad2f5f698 Mon Sep 17 00:00:00 2001 From: pengbo43 Date: Tue, 5 Mar 2024 09:38:56 +0800 Subject: [PATCH 6/6] chore: remove stack wrap --- packages/vite/src/client/overlay.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/vite/src/client/overlay.ts b/packages/vite/src/client/overlay.ts index 11c3ee3d5510df..17dbf00de7a288 100644 --- a/packages/vite/src/client/overlay.ts +++ b/packages/vite/src/client/overlay.ts @@ -114,8 +114,6 @@ pre.frame { .stack { font-size: 13px; color: var(--dim); - white-space: pre-wrap; - word-break: break-all; } .tip {