Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client): add guide to press Esc for closing the overlay #13896

Merged
merged 4 commits into from Jul 21, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion packages/vite/src/client/overlay.ts
Expand Up @@ -104,6 +104,7 @@ pre::-webkit-scrollbar {
color: #999;
border-top: 1px dotted #999;
padding-top: 13px;
line-height: 1.8;
}

code {
Expand All @@ -116,6 +117,21 @@ code {
text-decoration: underline;
cursor: pointer;
}

.kbd {
line-height: 1.5;
font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 0.75rem;
font-weight: 700;
background-color: rgb(38, 40, 44);
color: rgb(166, 167, 171);
padding: 0.15rem 0.3rem;
border-radius: 0.25rem;
border-width: 0.0625rem 0.0625rem 0.1875rem;
border-style: solid;
border-color: rgb(54, 57, 64);
border-image: initial;
}
</style>
<div class="backdrop" part="backdrop">
<div class="window" part="window">
Expand All @@ -124,7 +140,7 @@ code {
<pre class="frame" part="frame"></pre>
<pre class="stack" part="stack"></pre>
<div class="tip" part="tip">
Click outside or fix the code to dismiss.<br>
Click outside, press <span class="kbd">Esc</span> key, or fix the code to dismiss.<br>
bluwy marked this conversation as resolved.
Show resolved Hide resolved
You can also disable this overlay by setting
<code part="config-option-name">server.hmr.overlay</code> to <code part="config-option-value">false</code> in <code part="config-file-name">vite.config.js.</code>
</div>
Expand Down