Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e7453c3

Browse files
GatsbyJS BotLekoArts
andauthored
fix(gatsby): Improve Fast Refresh overlay styles (#29855) (#29861)
(cherry picked from commit c8bf060) Co-authored-by: Lennart <[email protected]>
1 parent 76f4f96 commit e7453c3

File tree

1 file changed

+42
-22
lines changed
  • packages/gatsby/cache-dir/fast-refresh-overlay

1 file changed

+42
-22
lines changed

packages/gatsby/cache-dir/fast-refresh-overlay/style.js

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ export const Style = () => (
1313
dangerouslySetInnerHTML={{
1414
__html: css`
1515
:host {
16-
--gatsby: #663399;
17-
--gatsbyLight: #9158ca;
18-
--dimmedWhite: rgba(255, 255, 255, 0.8);
19-
--codeFrame-bg: #eeeeee;
20-
--codeFrame-color: #414141;
21-
--codeFrame-button-bg: white;
22-
--white: #ffffff;
23-
--black: #000000;
2416
--color-ansi-selection: rgba(95, 126, 151, 0.48);
2517
--color-ansi-bg: #fafafa;
2618
--color-ansi-bg-darker: #eeeeee;
@@ -41,6 +33,18 @@ export const Style = () => (
4133
--color-ansi-bright-magenta: #795da3;
4234
--color-ansi-bright-red: #d91e18;
4335
--color-ansi-bright-yellow: #aa5d00;
36+
--importantLight: #ffffff;
37+
--importantDark: #000000;
38+
--backdrop: rgba(72, 67, 79, 0.5);
39+
--color: rgb(69, 74, 83);
40+
--background: var(--color-ansi-bright-white);
41+
--primary: #663399;
42+
--primaryLight: #9158ca;
43+
--link: var(--primary);
44+
--dimmedBg: rgba(255, 255, 255, 0.8);
45+
--codeFrame-bg: #eeeeee;
46+
--codeFrame-color: #414141;
47+
--codeFrame-button-bg: white;
4448
--radii: 5px;
4549
--z-index-backdrop: 8000;
4650
--z-index-overlay: 9000;
@@ -50,7 +54,7 @@ export const Style = () => (
5054
}
5155
5256
[data-gatsby-overlay="backdrop"] {
53-
background: rgba(72, 67, 79, 0.5);
57+
background: var(--backdrop);
5458
position: absolute;
5559
top: 0;
5660
left: 0;
@@ -67,7 +71,8 @@ export const Style = () => (
6771
font: 18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
6872
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
6973
"Segoe UI Symbol" !important;
70-
background: var(--color-ansi-bright-white);
74+
background: var(--background);
75+
color: var(--color);
7176
position: fixed;
7277
width: 100%;
7378
max-width: 60%;
@@ -84,12 +89,22 @@ export const Style = () => (
8489
z-index: var(--z-index-overlay);
8590
}
8691
92+
[data-gatsby-overlay="root"] a {
93+
color: var(--link);
94+
text-decoration: none;
95+
font-weight: 500;
96+
}
97+
98+
[data-gatsby-overlay="root"] a:hover {
99+
text-decoration: underline;
100+
}
101+
87102
[data-gatsby-overlay="header"] {
88103
display: grid;
89104
grid-gap: var(--space-sm);
90105
grid-template-columns: 1fr auto;
91-
color: var(--dimmedWhite);
92-
background: var(--gatsby);
106+
color: var(--dimmedBg);
107+
background: var(--primary);
93108
padding: var(--space);
94109
border-top-left-radius: var(--radii);
95110
border-top-right-radius: var(--radii);
@@ -113,14 +128,15 @@ export const Style = () => (
113128
margin-top: 0;
114129
font-weight: 500;
115130
font-size: 1.25em;
131+
color: var(--importantDark);
116132
}
117133
118134
[data-gatsby-overlay="pre"] {
119135
margin: 0;
120136
color: var(--color-ansi-fg);
121137
background: var(--color-ansi-bg);
122138
padding: var(--space-sm);
123-
border-radius: var(--radii);
139+
border-radius: 0 0 var(--radii) var(--radii);
124140
overflow: auto;
125141
}
126142
@@ -154,12 +170,12 @@ export const Style = () => (
154170
header[data-gatsby-error-type="graphql-error"]
155171
[data-gatsby-overlay="header__cause-file"]
156172
h1 {
157-
color: var(--white);
173+
color: var(--importantLight);
158174
}
159175
160176
[data-gatsby-overlay="header__cause-file"] span {
161177
font-size: 1.25em;
162-
color: var(--white);
178+
color: var(--importantLight);
163179
font-weight: 500;
164180
}
165181
@@ -169,9 +185,9 @@ export const Style = () => (
169185
justify-content: center;
170186
line-height: 1;
171187
cursor: pointer;
172-
color: var(--white);
173-
border: 1px solid var(--gatsby);
174-
background: var(--gatsbyLight);
188+
color: var(--importantLight);
189+
border: 1px solid var(--primary);
190+
background: var(--primaryLight);
175191
font-size: 0.9em;
176192
height: 32px;
177193
min-width: 2em;
@@ -216,8 +232,8 @@ export const Style = () => (
216232
cursor: pointer;
217233
border: 0;
218234
padding: 0;
219-
background-color: var(--gatsbyLight);
220-
color: var(--white);
235+
background-color: var(--primaryLight);
236+
color: var(--importantLight);
221237
appearance: none;
222238
height: 32px;
223239
width: 32px;
@@ -231,13 +247,17 @@ export const Style = () => (
231247
margin-top: var(--space);
232248
}
233249
250+
[data-gatsby-overlay="codeframe__top"]:first-of-type {
251+
border-radius: var(--radii) var(--radii) 0 0;
252+
}
253+
234254
[data-gatsby-overlay="codeframe__bottom"] {
235255
margin-top: var(--space);
236256
}
237257
238258
[data-gatsby-overlay="body__error-message-header"] {
239259
font-size: 1.2em;
240-
color: var(--black);
260+
color: var(--importantDark);
241261
margin-bottom: 1em;
242262
}
243263
@@ -295,7 +315,7 @@ export const Style = () => (
295315
width: 100%;
296316
text-align: left;
297317
font-size: 18px;
298-
color: var(--black);
318+
color: var(--importantDark);
299319
}
300320
301321
[data-gatsby-overlay="accordion__item__content"] {

0 commit comments

Comments
 (0)