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

Polish dev-overlay text styling #63721

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,18 @@ export function Errors({
</h1>
<p
id="nextjs__container_errors_desc"
className="nextjs__container_errors_desc nextjs__container_errors_desc--error"
className="nextjs__container_errors_desc"
>
{error.name}: <HotlinkedText text={error.message} />
</p>
{hydrationWarning && (
<>
<p id="nextjs__container_errors__extra">{hydrationWarning}</p>
<p
id="nextjs__container_errors__extra"
className="nextjs__container_errors__extra"
>
{hydrationWarning}
</p>
{activeError.componentStackFrames?.length ? (
<PseudoHtmlDiff
className="nextjs__container_errors__extra_code"
Expand Down Expand Up @@ -307,42 +312,43 @@ export const styles = css`
font-size: var(--size-font-big);
line-height: var(--size-font-bigger);
font-weight: bold;
margin: 0;
margin-top: calc(var(--size-gap-double) + var(--size-gap-half));
margin: var(--size-gap-double) 0;
}
.nextjs-container-errors-header small {
font-size: var(--size-font-small);
color: var(--color-accents-1);
margin-left: var(--size-gap-double);
}
.nextjs-container-errors-header small > span {
font-family: sans-serif;
font-family: var(--font-stack-sans);
}
.nextjs-container-errors-header p {
font-family: sans-serif;
font-family: var(--font-stack-sans);
font-size: var(--size-font-small);
line-height: var(--size-font-big);
font-weight: bold;
margin: 0;
margin-top: var(--size-gap-half);
margin-top: var(--size-gap);
white-space: pre-wrap;
}
.nextjs__container_errors_desc--error {
.nextjs__container_errors_desc {
padding-left: var(--size-gap);
border-left: 4px solid var(--color-accents-1);
color: var(--color-font);
margin-top: var(--size-gap);
font-weight: 500;
color: var(--color-stack-subline);
}
.nextjs__container_errors__extra {
margin: 20px 0;
margin: var(--size-gap-half) 0;
color: var(--color-stack-headline);
font-weight: 500;
}
.nextjs-container-errors-header > div > small {
margin: 0;
margin-top: var(--size-gap-half);
}
.nextjs-container-errors-header > p > a {
color: var(--color-ansi-red);
font-weight: bold;
}

.nextjs-container-errors-body > h2:not(:first-child) {
margin-top: calc(var(--size-gap-double) + var(--size-gap));
}
Expand All @@ -351,7 +357,7 @@ export const styles = css`
font-size: var(--size-font-big);
}
.nextjs__container_errors__extra_code {
margin: 20px 0;
margin-top: var(--size-gap);
padding: 12px 32px;
color: var(--color-ansi-fg);
background: var(--color-ansi-bg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const RootLayoutMissingTagsError: React.FC<RootLayoutMissingTagsErrorProp
{versionInfo ? <VersionStalenessInfo {...versionInfo} /> : null}
<p
id="nextjs__container_errors_desc"
className="nextjs__container_errors_desc nextjs__container_errors_desc--error"
className="nextjs__container_errors_desc"
>
<HotlinkedText
text={`The following tags are missing in the Root Layout: ${missingTags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function Base() {

--font-stack-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono',
Menlo, Courier, monospace;
--font-stack-sans: -apple-system, BlinkMacSystemFont, sans-serif;

--color-ansi-selection: rgba(95, 126, 151, 0.48);
--color-ansi-bg: #111111;
Expand Down Expand Up @@ -62,7 +63,7 @@ export function Base() {

--color-stack-h6: rgb(200, 200, 204);
--color-stack-headline: rgb(99, 99, 102);
--color-stack-subline: rgba(142, 142, 147);
--color-stack-subline: rgb(121, 121, 121);

--color-accents-3: rgb(118, 118, 118);
}
Expand Down