Skip to content

Commit da389cc

Browse files
authored
feat(client): add guide to press Esc for closing the overlay (#13896)
1 parent 51c271f commit da389cc

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

packages/vite/src/client/overlay.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ pre::-webkit-scrollbar {
104104
color: #999;
105105
border-top: 1px dotted #999;
106106
padding-top: 13px;
107+
line-height: 1.8;
107108
}
108109
109110
code {
@@ -116,6 +117,21 @@ code {
116117
text-decoration: underline;
117118
cursor: pointer;
118119
}
120+
121+
kbd {
122+
line-height: 1.5;
123+
font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
124+
font-size: 0.75rem;
125+
font-weight: 700;
126+
background-color: rgb(38, 40, 44);
127+
color: rgb(166, 167, 171);
128+
padding: 0.15rem 0.3rem;
129+
border-radius: 0.25rem;
130+
border-width: 0.0625rem 0.0625rem 0.1875rem;
131+
border-style: solid;
132+
border-color: rgb(54, 57, 64);
133+
border-image: initial;
134+
}
119135
</style>
120136
<div class="backdrop" part="backdrop">
121137
<div class="window" part="window">
@@ -124,7 +140,7 @@ code {
124140
<pre class="frame" part="frame"></pre>
125141
<pre class="stack" part="stack"></pre>
126142
<div class="tip" part="tip">
127-
Click outside or fix the code to dismiss.<br>
143+
Click outside, press <kbd>Esc</kbd> key, or fix the code to dismiss.<br>
128144
You can also disable this overlay by setting
129145
<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>
130146
</div>

0 commit comments

Comments
 (0)