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

chore: add dark mode for dev overlay #48601

Merged
merged 5 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const styles = css`
margin-right: auto;
margin-left: auto;
outline: none;
background: white;
background: var(--color-background);
border-radius: var(--size-gap);
box-shadow: 0 var(--size-gap-half) var(--size-gap-double)
rgba(0, 0, 0, 0.25);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const styles = css`
opacity: 0.4;
transition: opacity 0.25s ease;
color: var(--color-font);
}
[data-nextjs-dialog-left-right] > button:last-of-type:hover {
opacity: 0.7;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const styles = css`
right: 0;
bottom: 0;
left: 0;
background-color: rgba(17, 17, 17, 0.2);
background-color: var(--color-backdrop);
pointer-events: all;
z-index: -1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ export const styles = css`
}
.nextjs-container-build-error-body small {
color: #757575;
color: var(--color-font);
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,17 @@ export const styles = css`
margin-top: 0;
margin-bottom: var(--size-gap);
font-family: var(--font-stack-monospace);
font-size: var(--size-font);
color: #222;
color: var(--color-stack-h6);
}
[data-nextjs-call-stack-frame] > h3[data-nextjs-frame-expanded='false'] {
color: #666;
[data-nextjs-call-stack-frame] > h6[data-nextjs-frame-expanded='false'] {
ijjk marked this conversation as resolved.
Show resolved Hide resolved
color: var(--color-stack-headline);
}
[data-nextjs-call-stack-frame] > div {
display: flex;
align-items: center;
padding-left: calc(var(--size-gap) + var(--size-gap-half));
font-size: var(--size-font-small);
color: #999;
color: var(--color-stack-subline);
}
[data-nextjs-call-stack-frame] > div > svg {
width: auto;
Expand Down
22 changes: 22 additions & 0 deletions packages/react-dev-overlay/src/internal/styles/Base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ export function Base() {
--size-font-big: 20px;
--size-font-bigger: 24px;
--color-background: white;
--color-font: #757575;
--color-backdrop: rgba(17, 17, 17, 0.2);
--color-stack-h6: #222;
--color-stack-headline: #666;
--color-stack-subline: #999;
--color-accents-1: #808080;
--color-accents-2: #222222;
--color-accents-3: #404040;
Expand Down Expand Up @@ -46,6 +54,20 @@ export function Base() {
--color-ansi-bright-yellow: #ffd966;
}
@media (prefers-color-scheme: dark) {
:host {
--color-background: rgb(28, 28, 30);
--color-font: white;
--color-backdrop: rgb(44, 44, 46);
--color-stack-h6: rgb(200, 200, 204);
--color-stack-headline: rgb(99, 99, 102);
--color-stack-subline: rgba(142, 142, 147);
--color-accents-3: rgb(118, 118, 118);
}
}
.mono {
font-family: var(--font-stack-monospace);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function CssReset() {
font-size: 16px;
font-weight: 400;
line-height: 1.5;
color: #212529;
color: var(--color-font);
text-align: left;
background-color: #fff;
}
Expand Down