Unverified Commit 052c9798 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

[dev-overlay] use `rem` for sizes and `px` for spacings (#76385)

parent dea02ce9
...@@ -70,8 +70,8 @@ export const CallStackFrame: React.FC<{ ...@@ -70,8 +70,8 @@ export const CallStackFrame: React.FC<{
export const CALL_STACK_FRAME_STYLES = ` export const CALL_STACK_FRAME_STYLES = `
[data-nextjs-call-stack-frame-ignored] { [data-nextjs-call-stack-frame-ignored] {
padding: var(--size-6) var(--size-8); padding: 6px 8px;
margin-bottom: var(--size-4); margin-bottom: 4px;
border-radius: var(--rounded-lg); border-radius: var(--rounded-lg);
} }
...@@ -98,15 +98,20 @@ export const CALL_STACK_FRAME_STYLES = ` ...@@ -98,15 +98,20 @@ export const CALL_STACK_FRAME_STYLES = `
.call-stack-frame-method-name { .call-stack-frame-method-name {
display: flex; display: flex;
align-items: center; align-items: center;
gap: var(--size-4); gap: 4px;
margin-bottom: var(--size-4); margin-bottom: 4px;
font-family: var(--font-stack-monospace); font-family: var(--font-stack-monospace);
color: var(--color-gray-1000); color: var(--color-gray-1000);
font-size: var(--size-14); font-size: var(--size-14);
font-weight: 500; font-weight: 500;
line-height: var(--size-20); line-height: var(--size-20);
svg {
width: var(--size-16px);
height: var(--size-16px);
}
} }
.open-in-editor-button { .open-in-editor-button {
...@@ -117,6 +122,11 @@ export const CALL_STACK_FRAME_STYLES = ` ...@@ -117,6 +122,11 @@ export const CALL_STACK_FRAME_STYLES = `
padding: 4px; padding: 4px;
color: var(--color-font); color: var(--color-font);
svg {
width: var(--size-16);
height: var(--size-16);
}
&:focus-visible { &:focus-visible {
outline: var(--focus-ring); outline: var(--focus-ring);
outline-offset: -2px; outline-offset: -2px;
......
...@@ -120,9 +120,14 @@ export const CODE_FRAME_STYLES = ` ...@@ -120,9 +120,14 @@ export const CODE_FRAME_STYLES = `
border: 1px solid var(--color-gray-400); border: 1px solid var(--color-gray-400);
border-radius: 8px; border-radius: 8px;
font-family: var(--font-stack-monospace); font-family: var(--font-stack-monospace);
font-size: 12px; font-size: var(--size-12);
line-height: 16px; line-height: var(--size-16);
margin: var(--size-8) 0; margin: 8px 0;
svg {
width: var(--size-16);
height: var(--size-16);
}
} }
.code-frame-link, .code-frame-link,
...@@ -156,6 +161,7 @@ export const CODE_FRAME_STYLES = ` ...@@ -156,6 +161,7 @@ export const CODE_FRAME_STYLES = `
margin: -4px 0 -4px auto; margin: -4px 0 -4px auto;
border-radius: var(--rounded-full); border-radius: var(--rounded-full);
margin-left: auto; margin-left: auto;
&:focus-visible { &:focus-visible {
outline: var(--focus-ring); outline: var(--focus-ring);
outline-offset: -2px; outline-offset: -2px;
......
...@@ -216,6 +216,7 @@ function CopyIcon(props: React.SVGProps<SVGSVGElement>) { ...@@ -216,6 +216,7 @@ function CopyIcon(props: React.SVGProps<SVGSVGElement>) {
<svg <svg
width="14" width="14"
height="14" height="14"
viewBox="0 0 14 14"
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
{...props} {...props}
...@@ -248,6 +249,11 @@ function CopySuccessIcon() { ...@@ -248,6 +249,11 @@ function CopySuccessIcon() {
export const COPY_BUTTON_STYLES = ` export const COPY_BUTTON_STYLES = `
.nextjs-data-copy-button { .nextjs-data-copy-button {
color: inherit; color: inherit;
svg {
width: var(--size-16);
height: var(--size-16);
}
} }
.nextjs-data-copy-button--initial:hover { .nextjs-data-copy-button--initial:hover {
cursor: pointer; cursor: pointer;
......
const styles = ` const styles = `
[data-nextjs-dialog-root] { [data-nextjs-dialog-root] {
--next-dialog-radius: var(--rounded-xl); --next-dialog-radius: var(--rounded-xl);
--next-dialog-footer-height: 48px; --next-dialog-footer-height: var(--size-48);
--next-dialog-max-width: 960px; --next-dialog-max-width: 960px;
--next-dialog-row-padding: 16px; --next-dialog-row-padding: 16px;
--next-dialog-container-padding: 12px;
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;
...@@ -54,7 +55,7 @@ const styles = ` ...@@ -54,7 +55,7 @@ const styles = `
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
padding: var(--size-16) var(--size-12); padding: 16px 12px;
} }
/* Account for the footer height, when present */ /* Account for the footer height, when present */
...@@ -64,7 +65,7 @@ const styles = ` ...@@ -64,7 +65,7 @@ const styles = `
[data-nextjs-dialog-content] > [data-nextjs-dialog-header] { [data-nextjs-dialog-content] > [data-nextjs-dialog-header] {
flex-shrink: 0; flex-shrink: 0;
margin-bottom: var(--size-8); margin-bottom: 8px;
} }
[data-nextjs-dialog-content] > [data-nextjs-dialog-body] { [data-nextjs-dialog-content] > [data-nextjs-dialog-body] {
......
...@@ -121,15 +121,15 @@ function ChevronUpDown() { ...@@ -121,15 +121,15 @@ function ChevronUpDown() {
export const CALL_STACK_STYLES = ` export const CALL_STACK_STYLES = `
.error-overlay-call-stack-container { .error-overlay-call-stack-container {
position: relative; position: relative;
margin-top: var(--size-8); margin-top: 8px;
} }
.error-overlay-call-stack-header { .error-overlay-call-stack-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
min-height: 28px; min-height: var(--size-28);
padding: var(--size-8) var(--size-8) var(--size-12) var(--size-4); padding: 8px 8px 12px 4px;
width: 100%; width: 100%;
} }
...@@ -137,14 +137,13 @@ export const CALL_STACK_STYLES = ` ...@@ -137,14 +137,13 @@ export const CALL_STACK_STYLES = `
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
gap: var(--size-8); gap: 8px;
margin: 0; margin: 0;
color: var(--color-gray-1000); color: var(--color-gray-1000);
font-size: var(--size-16); font-size: var(--size-16);
font-weight: 500; font-weight: 500;
line-height: var(--size-20);
} }
.error-overlay-call-stack-count { .error-overlay-call-stack-count {
...@@ -152,9 +151,9 @@ export const CALL_STACK_STYLES = ` ...@@ -152,9 +151,9 @@ export const CALL_STACK_STYLES = `
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 20px; width: var(--size-20);
height: 20px; height: var(--size-20);
gap: var(--size-4); gap: 4px;
color: var(--color-gray-1000); color: var(--color-gray-1000);
text-align: center; text-align: center;
...@@ -186,5 +185,10 @@ export const CALL_STACK_STYLES = ` ...@@ -186,5 +185,10 @@ export const CALL_STACK_STYLES = `
&:focus { &:focus {
outline: var(--focus-ring); outline: var(--focus-ring);
} }
svg {
width: var(--size-16);
height: var(--size-16);
}
} }
` `
...@@ -262,8 +262,8 @@ function DevToolsPopover({ ...@@ -262,8 +262,8 @@ function DevToolsPopover({
// Reset the toast component's default positions. // Reset the toast component's default positions.
bottom: 'initial', bottom: 'initial',
left: 'initial', left: 'initial',
[vertical]: 'var(--size-10)', [vertical]: '10px',
[horizontal]: 'var(--size-20)', [horizontal]: '20px',
}} }}
> >
<NextLogo <NextLogo
...@@ -395,7 +395,13 @@ function DevToolsPopover({ ...@@ -395,7 +395,13 @@ function DevToolsPopover({
function ChevronRight() { function ChevronRight() {
return ( return (
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"> <svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
>
<path <path
fill="#666" fill="#666"
fillRule="evenodd" fillRule="evenodd"
...@@ -593,10 +599,16 @@ export const DEV_TOOLS_INDICATOR_STYLES = ` ...@@ -593,10 +599,16 @@ export const DEV_TOOLS_INDICATOR_STYLES = `
display: flex; display: flex;
align-items: center; align-items: center;
padding: 8px 6px; padding: 8px 6px;
height: 36px; height: var(--size-36);
border-radius: 6px; border-radius: 6px;
text-decoration: none !important; text-decoration: none !important;
user-select: none; user-select: none;
white-space: nowrap;
svg {
width: var(--size-16);
height: var(--size-16);
}
&:focus-visible { &:focus-visible {
outline: 0; outline: 0;
...@@ -636,8 +648,8 @@ export const DEV_TOOLS_INDICATOR_STYLES = ` ...@@ -636,8 +648,8 @@ export const DEV_TOOLS_INDICATOR_STYLES = `
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 8px; gap: 8px;
min-width: 41px; min-width: var(--size-40);
height: 24px; height: var(--size-24);
background: var(--color-background-100); background: var(--color-background-100);
border: 1px solid var(--color-gray-alpha-400); border: 1px solid var(--color-gray-alpha-400);
background-clip: padding-box; background-clip: padding-box;
...@@ -646,7 +658,7 @@ export const DEV_TOOLS_INDICATOR_STYLES = ` ...@@ -646,7 +658,7 @@ export const DEV_TOOLS_INDICATOR_STYLES = `
color: var(--color-gray-1000); color: var(--color-gray-1000);
border-radius: 128px; border-radius: 128px;
font-weight: 500; font-weight: 500;
font-size: 13px; font-size: var(--size-13);
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
&[data-has-issues='true'] { &[data-has-issues='true'] {
...@@ -655,8 +667,8 @@ export const DEV_TOOLS_INDICATOR_STYLES = ` ...@@ -655,8 +667,8 @@ export const DEV_TOOLS_INDICATOR_STYLES = `
} }
.dev-tools-indicator-issue-count-indicator { .dev-tools-indicator-issue-count-indicator {
width: 8px; width: var(--size-8);
height: 8px; height: var(--size-8);
background: var(--color-primary); background: var(--color-primary);
box-shadow: 0 0 0 2px var(--color-secondary); box-shadow: 0 0 0 2px var(--color-secondary);
border-radius: 50%; border-radius: 50%;
...@@ -665,7 +677,7 @@ export const DEV_TOOLS_INDICATOR_STYLES = ` ...@@ -665,7 +677,7 @@ export const DEV_TOOLS_INDICATOR_STYLES = `
.dev-tools-indicator-shortcut { .dev-tools-indicator-shortcut {
display: flex; display: flex;
gap: var(--size-4); gap: 4px;
kbd { kbd {
width: var(--size-20); width: var(--size-20);
......
...@@ -69,23 +69,23 @@ export const DEV_TOOLS_INFO_STYLES = ` ...@@ -69,23 +69,23 @@ export const DEV_TOOLS_INFO_STYLES = `
} }
.dev-tools-info-container { .dev-tools-info-container {
padding: var(--size-6); padding: 6px;
} }
.dev-tools-info-title { .dev-tools-info-title {
padding: var(--size-8) var(--size-6); padding: 8px 6px;
color: var(--color-gray-1000); color: var(--color-gray-1000);
font-size: 14px; font-size: var(--size-14);
font-weight: 500; font-weight: 500;
line-height: 20px; line-height: var(--size-20);
margin: 0; margin: 0;
} }
.dev-tools-info-article { .dev-tools-info-article {
padding: var(--size-8) var(--size-6); padding: 8px 6px;
color: var(--color-gray-1000); color: var(--color-gray-1000);
font-size: 14px; font-size: var(--size-14);
line-height: 20px; line-height: var(--size-20);
margin: 0; margin: 0;
} }
.dev-tools-info-paragraph { .dev-tools-info-paragraph {
...@@ -98,15 +98,15 @@ export const DEV_TOOLS_INFO_STYLES = ` ...@@ -98,15 +98,15 @@ export const DEV_TOOLS_INFO_STYLES = `
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: var(--size-8) var(--size-6); padding: 8px 6px;
} }
.dev-tools-info-close-button { .dev-tools-info-close-button {
padding: 0 var(--size-8); padding: 0 8px;
height: 28px; height: var(--size-28);
font-size: 14px; font-size: var(--size-14);
font-weight: 500; font-weight: 500;
line-height: 20px; line-height: var(--size-20);
transition: background var(--duration-short) ease; transition: background var(--duration-short) ease;
color: var(--color-gray-1000); color: var(--color-gray-1000);
border-radius: var(--rounded-md-2); border-radius: var(--rounded-md-2);
...@@ -120,11 +120,11 @@ export const DEV_TOOLS_INFO_STYLES = ` ...@@ -120,11 +120,11 @@ export const DEV_TOOLS_INFO_STYLES = `
.dev-tools-info-learn-more-button { .dev-tools-info-learn-more-button {
align-content: center; align-content: center;
padding: 0 var(--size-8); padding: 0 8px;
height: 28px; height: var(--size-28);
font-size: 14px; font-size: var(--size-14);
font-weight: 500; font-weight: 500;
line-height: 20px; line-height: var(--size-20);
transition: background var(--duration-short) ease; transition: background var(--duration-short) ease;
color: var(--color-background-100); color: var(--color-background-100);
border-radius: var(--rounded-md-2); border-radius: var(--rounded-md-2);
......
...@@ -115,15 +115,15 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = ` ...@@ -115,15 +115,15 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = `
background: var(--color-gray-400); background: var(--color-gray-400);
color: var(--color-gray-1000); color: var(--color-gray-1000);
font-family: var(--font-stack-mono); font-family: var(--font-stack-mono);
padding: var(--size-2) var(--size-4); padding: 2px 4px;
margin: 0; margin: 0;
font-size: 13px; font-size: var(--size-13);
white-space: break-spaces; white-space: break-spaces;
border-radius: var(--rounded-md-2); border-radius: var(--rounded-md-2);
} }
.dev-tools-info-code-block-container { .dev-tools-info-code-block-container {
padding: var(--size-6); padding: 6px;
} }
.dev-tools-info-code-block { .dev-tools-info-code-block {
...@@ -137,7 +137,7 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = ` ...@@ -137,7 +137,7 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = `
.dev-tools-info-code-block-pre { .dev-tools-info-code-block-pre {
margin: 0; margin: 0;
font-family: var(--font-stack-mono); font-family: var(--font-stack-mono);
font-size: 12px; font-size: var(--size-12);
} }
.dev-tools-info-copy-button { .dev-tools-info-copy-button {
...@@ -146,9 +146,9 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = ` ...@@ -146,9 +146,9 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = `
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
right: var(--size-8); right: 8px;
top: var(--size-8); top: 8px;
padding: var(--size-4); padding: 4px;
height: var(--size-24); height: var(--size-24);
width: var(--size-24); width: var(--size-24);
border-radius: var(--rounded-md-2); border-radius: var(--rounded-md-2);
...@@ -159,7 +159,7 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = ` ...@@ -159,7 +159,7 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = `
.dev-tools-info-code-block-line { .dev-tools-info-code-block-line {
display: block; display: block;
line-height: 1.5; line-height: 1.5;
padding: 0 1rem; padding: 0 16px;
} }
.dev-tools-info-code-block-line.dev-tools-info-highlight { .dev-tools-info-code-block-line.dev-tools-info-highlight {
......
...@@ -12,7 +12,8 @@ interface Props extends React.ComponentProps<'button'> { ...@@ -12,7 +12,8 @@ interface Props extends React.ComponentProps<'button'> {
toggleErrorOverlay: () => void toggleErrorOverlay: () => void
} }
const SIZE = 36 const SIZE = '2.25rem' // 36px in 16px base
const SIZE_PX = 36
const SHORT_DURATION_MS = 150 const SHORT_DURATION_MS = 150
/** /**
...@@ -94,7 +95,7 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -94,7 +95,7 @@ export const NextLogo = forwardRef(function NextLogo(
data-next-badge-root data-next-badge-root
style={ style={
{ {
'--size': `${SIZE}px`, '--size': SIZE,
'--duration-short': `${SHORT_DURATION_MS}ms`, '--duration-short': `${SHORT_DURATION_MS}ms`,
// if the indicator is disabled and there are no errors, hide the badge // if the indicator is disabled and there are no errors, hide the badge
display: disabled && !hasError ? 'none' : 'block', display: disabled && !hasError ? 'none' : 'block',
...@@ -112,8 +113,7 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -112,8 +113,7 @@ export const NextLogo = forwardRef(function NextLogo(
--color-hover-alpha-subtle: hsla(0, 0%, 100%, 0.13); --color-hover-alpha-subtle: hsla(0, 0%, 100%, 0.13);
--color-hover-alpha-error: hsla(0, 0%, 100%, 0.2); --color-hover-alpha-error: hsla(0, 0%, 100%, 0.2);
--color-hover-alpha-error-2: hsla(0, 0%, 100%, 0.25); --color-hover-alpha-error-2: hsla(0, 0%, 100%, 0.25);
--padding: 2px; --mark-size: calc(var(--size) - var(--size-2) * 2);
--mark-size: calc(var(--size) - var(--padding) * 2);
--focus-color: var(--color-blue-800); --focus-color: var(--color-blue-800);
--focus-ring: 2px solid var(--focus-color); --focus-ring: 2px solid var(--focus-color);
...@@ -143,7 +143,7 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -143,7 +143,7 @@ export const NextLogo = forwardRef(function NextLogo(
inset 0 0 0 1px var(--color-inner-border), inset 0 0 0 1px var(--color-inner-border),
0px 16px 32px -8px rgba(0, 0, 0, 0.24); 0px 16px 32px -8px rgba(0, 0, 0, 0.24);
backdrop-filter: blur(48px); backdrop-filter: blur(48px);
border-radius: 9999px; border-radius: var(--rounded-full);
user-select: none; user-select: none;
cursor: pointer; cursor: pointer;
scale: 1; scale: 1;
...@@ -207,8 +207,8 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -207,8 +207,8 @@ export const NextLogo = forwardRef(function NextLogo(
[data-dot] { [data-dot] {
content: ''; content: '';
width: 8px; width: var(--size-8);
height: 8px; height: var(--size-8);
background: #fff; background: #fff;
box-shadow: 0 0 0 1px var(--color-outer-border); box-shadow: 0 0 0 1px var(--color-outer-border);
border-radius: 50%; border-radius: 50%;
...@@ -223,15 +223,15 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -223,15 +223,15 @@ export const NextLogo = forwardRef(function NextLogo(
[data-issues] { [data-issues] {
display: flex; display: flex;
gap: var(--padding); gap: 2px;
align-items: center; align-items: center;
padding-left: 8px; padding-left: 8px;
padding-right: ${disabled || isBuildError padding-right: ${disabled || isBuildError
? '8px' ? '8px'
: 'calc(var(--padding) * 2)'}; : 'calc(2px * 2)'};
height: 32px; height: var(--size-32);
margin: 0 var(--padding); margin: 0 2px;
border-radius: 9999px; border-radius: var(--rounded-full);
transition: background var(--duration-short) ease; transition: background var(--duration-short) ease;
&:has([data-issues-open]:hover) { &:has([data-issues-open]:hover) {
...@@ -244,7 +244,7 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -244,7 +244,7 @@ export const NextLogo = forwardRef(function NextLogo(
} }
[data-issues-open] { [data-issues-open] {
font-size: 13px; font-size: var(--size-13);
color: white; color: white;
width: fit-content; width: fit-content;
height: 100%; height: 100%;
...@@ -252,7 +252,7 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -252,7 +252,7 @@ export const NextLogo = forwardRef(function NextLogo(
gap: 2px; gap: 2px;
align-items: center; align-items: center;
margin: 0; margin: 0;
line-height: 36px; line-height: var(--size-36);
font-weight: 500; font-weight: 500;
z-index: 2; z-index: 2;
white-space: nowrap; white-space: nowrap;
...@@ -263,9 +263,9 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -263,9 +263,9 @@ export const NextLogo = forwardRef(function NextLogo(
} }
[data-issues-collapse] { [data-issues-collapse] {
width: 24px; width: var(--size-24);
height: 24px; height: var(--size-24);
border-radius: 9999px; border-radius: var(--rounded-full);
transition: background var(--duration-short) ease; transition: background var(--duration-short) ease;
&:hover { &:hover {
...@@ -275,15 +275,17 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -275,15 +275,17 @@ export const NextLogo = forwardRef(function NextLogo(
[data-cross] { [data-cross] {
color: #fff; color: #fff;
width: var(--size-12);
height: var(--size-12);
} }
[data-next-mark] { [data-next-mark] {
width: var(--mark-size); width: var(--mark-size);
height: var(--mark-size); height: var(--mark-size);
margin-left: var(--padding); margin-left: 2px;
display: flex; display: flex;
align-items: center; align-items: center;
border-radius: 9999px; border-radius: var(--rounded-full);
transition: background var(--duration-long) var(--timing); transition: background var(--duration-long) var(--timing);
&:focus-visible { &:focus-visible {
...@@ -296,6 +298,8 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -296,6 +298,8 @@ export const NextLogo = forwardRef(function NextLogo(
svg { svg {
flex-shrink: 0; flex-shrink: 0;
width: var(--size-40);
height: var(--size-40);
} }
} }
...@@ -421,7 +425,7 @@ export const NextLogo = forwardRef(function NextLogo( ...@@ -421,7 +425,7 @@ export const NextLogo = forwardRef(function NextLogo(
data-error-expanded={isErrorExpanded} data-error-expanded={isErrorExpanded}
data-animate={newErrorDetected} data-animate={newErrorDetected}
style={{ style={{
width: hasError && width > SIZE ? width : SIZE, width: hasError && width > SIZE_PX ? width : SIZE,
}} }}
> >
<div ref={ref}> <div ref={ref}>
......
...@@ -32,7 +32,7 @@ export const DIALOG_STYLES = ` ...@@ -32,7 +32,7 @@ export const DIALOG_STYLES = `
background: var(--color-background-100); background: var(--color-background-100);
background-clip: padding-box; background-clip: padding-box;
border: 1px solid var(--color-gray-400); border: 1px solid var(--color-gray-400);
border-radius: var(--next-dialog-radius); border-radius: var(--rounded-xl);
box-shadow: var(--shadow-menu); box-shadow: var(--shadow-menu);
position: relative; position: relative;
......
...@@ -44,7 +44,7 @@ export const DIALOG_HEADER_STYLES = ` ...@@ -44,7 +44,7 @@ export const DIALOG_HEADER_STYLES = `
.nextjs-container-errors-header .nextjs-container-errors-header
> .nextjs-container-build-error-version-status { > .nextjs-container-build-error-version-status {
position: absolute; position: absolute;
top: var(--size-16); top: 16px;
right: var(--size-16); right: 16px;
} }
` `
...@@ -8,15 +8,15 @@ export function EnvironmentNameLabel({ ...@@ -8,15 +8,15 @@ export function EnvironmentNameLabel({
export const ENVIRONMENT_NAME_LABEL_STYLES = ` export const ENVIRONMENT_NAME_LABEL_STYLES = `
[data-nextjs-environment-name-label] { [data-nextjs-environment-name-label] {
padding: var(--size-2) var(--size-6); padding: 2px 6px;
margin: 0; margin: 0;
/* used --size instead of --rounded because --rounded is missing 6px */ /* used --size instead of --rounded because --rounded is missing 6px */
border-radius: var(--size-6); border-radius: var(--rounded-md-2);
background: var(--color-gray-300); background: var(--color-gray-300);
font-weight: 600; font-weight: 600;
font-size: var(--size-11); font-size: var(--size-11);
color: var(--color-gray-900); color: var(--color-gray-900);
font-family: var(--font-stack-monospace); font-family: var(--font-stack-monospace);
line-height: var(--size-20); line-height: 1.25em; /* 20px in 16px font size */
} }
` `
...@@ -50,7 +50,7 @@ export const styles = ` ...@@ -50,7 +50,7 @@ export const styles = `
.nextjs__container_errors_desc { .nextjs__container_errors_desc {
margin: 0; margin: 0;
margin-left: var(--size-4); margin-left: 4px;
color: var(--color-red-900); color: var(--color-red-900);
font-weight: 500; font-weight: 500;
font-size: var(--size-16); font-size: var(--size-16);
...@@ -92,7 +92,7 @@ export const styles = ` ...@@ -92,7 +92,7 @@ export const styles = `
box-shadow: box-shadow:
0px 2px 2px var(--color-gray-alpha-100), 0px 2px 2px var(--color-gray-alpha-100),
0px 8px 8px -8px var(--color-gray-alpha-100); 0px 8px 8px -8px var(--color-gray-alpha-100);
font-size: 13px; font-size: var(--size-13);
cursor: pointer; cursor: pointer;
color: var(--color-gray-900); color: var(--color-gray-900);
font-weight: 500; font-weight: 500;
......
...@@ -113,7 +113,7 @@ export const styles = ` ...@@ -113,7 +113,7 @@ export const styles = `
} }
.error-feedback-thanks { .error-feedback-thanks {
height: 24px; height: var(--size-24);
display: flex; display: flex;
align-items: center; align-items: center;
padding-right: 4px; /* To match the 4px inner padding of the thumbs up and down icons */ padding-right: 4px; /* To match the 4px inner padding of the thumbs up and down icons */
...@@ -123,8 +123,8 @@ export const styles = ` ...@@ -123,8 +123,8 @@ export const styles = `
background: none; background: none;
border: none; border: none;
border-radius: var(--rounded-md); border-radius: var(--rounded-md);
width: 24px; width: var(--size-24);
height: 24px; height: var(--size-24);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -155,5 +155,7 @@ export const styles = ` ...@@ -155,5 +155,7 @@ export const styles = `
.thumbs-up-icon, .thumbs-up-icon,
.thumbs-down-icon { .thumbs-down-icon {
color: var(--color-gray-900); color: var(--color-gray-900);
width: var(--size-16);
height: var(--size-16);
} }
` `
...@@ -29,7 +29,7 @@ export const styles = ` ...@@ -29,7 +29,7 @@ export const styles = `
justify-content: space-between; justify-content: space-between;
gap: 8px; gap: 8px;
padding: var(--size-12); padding: 12px;
background: var(--color-background-200); background: var(--color-background-200);
border-top: 1px solid var(--color-gray-400); border-top: 1px solid var(--color-gray-400);
} }
...@@ -38,7 +38,7 @@ export const styles = ` ...@@ -38,7 +38,7 @@ export const styles = `
margin-left: auto; margin-left: auto;
p { p {
font-size: 14px; font-size: var(--size-14);
font-weight: 500; font-weight: 500;
margin: 0; margin: 0;
} }
...@@ -47,7 +47,7 @@ export const styles = ` ...@@ -47,7 +47,7 @@ export const styles = `
.error-overlay-footer-message { .error-overlay-footer-message {
color: var(--color-gray-900); color: var(--color-gray-900);
margin: 0; margin: 0;
font-size: 14px; font-size: var(--size-14);
font-weight: 400; font-weight: 400;
line-height: var(--size-20); line-height: var(--size-20);
} }
......
...@@ -152,6 +152,6 @@ export const styles = ` ...@@ -152,6 +152,6 @@ export const styles = `
[data-nextjs-error-label-group] { [data-nextjs-error-label-group] {
display: flex; display: flex;
align-items: center; align-items: center;
gap: var(--size-8); gap: 8px;
} }
` `
...@@ -43,6 +43,7 @@ export function ErrorOverlayNav({ ...@@ -43,6 +43,7 @@ export function ErrorOverlayNav({
export const styles = ` export const styles = `
[data-nextjs-error-overlay-nav] { [data-nextjs-error-overlay-nav] {
--notch-height: 2.625rem; /* 42px */
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -59,7 +60,7 @@ export const styles = ` ...@@ -59,7 +60,7 @@ export const styles = `
translate: -1px 0; translate: -1px 0;
width: auto; width: auto;
height: 42px; height: var(--notch-height);
padding: 12px; padding: 12px;
background: var(--background-color); background: var(--background-color);
border: 1px solid var(--stroke-color); border: 1px solid var(--stroke-color);
...@@ -68,7 +69,7 @@ export const styles = ` ...@@ -68,7 +69,7 @@ export const styles = `
&[data-side='left'] { &[data-side='left'] {
padding-right: 0; padding-right: 0;
border-radius: var(--next-dialog-radius) 0 0 0; border-radius: var(--rounded-xl) 0 0 0;
.error-overlay-notch-tail { .error-overlay-notch-tail {
right: -54px; right: -54px;
...@@ -81,7 +82,7 @@ export const styles = ` ...@@ -81,7 +82,7 @@ export const styles = `
&[data-side='right'] { &[data-side='right'] {
padding-left: 0; padding-left: 0;
border-radius: 0 var(--next-dialog-radius) 0 0; border-radius: 0 var(--rounded-xl) 0 0;
.error-overlay-notch-tail { .error-overlay-notch-tail {
left: -54px; left: -54px;
...@@ -98,6 +99,7 @@ export const styles = ` ...@@ -98,6 +99,7 @@ export const styles = `
top: -1px; top: -1px;
pointer-events: none; pointer-events: none;
z-index: -1; z-index: -1;
height: calc(100% + 1px);
} }
} }
} }
...@@ -127,6 +129,7 @@ function Tail() { ...@@ -127,6 +129,7 @@ function Tail() {
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
className="error-overlay-notch-tail" className="error-overlay-notch-tail"
preserveAspectRatio="none"
> >
<mask <mask
id="mask0_2667_14687" id="mask0_2667_14687"
......
...@@ -166,7 +166,7 @@ export const styles = ` ...@@ -166,7 +166,7 @@ export const styles = `
text-align: center; text-align: center;
font-size: var(--size-14); font-size: var(--size-14);
font-weight: 500; font-weight: 500;
line-height: 16px; line-height: var(--size-16);
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
} }
...@@ -175,14 +175,19 @@ export const styles = ` ...@@ -175,14 +175,19 @@ export const styles = `
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 24px; width: var(--size-24);
height: 24px; height: var(--size-24);
background: var(--color-gray-300); background: var(--color-gray-300);
flex-shrink: 0; flex-shrink: 0;
border: none; border: none;
border-radius: var(--rounded-full); border-radius: var(--rounded-full);
svg {
width: var(--size-16);
height: var(--size-16);
}
&:focus-visible { &:focus-visible {
outline: var(--focus-ring); outline: var(--focus-ring);
} }
......
...@@ -70,6 +70,7 @@ function DocsIcon(props: React.SVGProps<SVGSVGElement>) { ...@@ -70,6 +70,7 @@ function DocsIcon(props: React.SVGProps<SVGSVGElement>) {
<svg <svg
width="14" width="14"
height="14" height="14"
viewBox="0 0 14 14"
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
{...props} {...props}
......
...@@ -26,7 +26,7 @@ export function ErrorOverlayToolbar({ ...@@ -26,7 +26,7 @@ export function ErrorOverlayToolbar({
export const styles = ` export const styles = `
.error-overlay-toolbar { .error-overlay-toolbar {
display: flex; display: flex;
gap: var(--size-6); gap: 6px;
} }
.nodejs-inspector-button, .nodejs-inspector-button,
...@@ -36,14 +36,19 @@ export const styles = ` ...@@ -36,14 +36,19 @@ export const styles = `
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 28px; width: var(--size-28);
height: 28px; height: var(--size-28);
background: var(--color-background-100); background: var(--color-background-100);
background-clip: padding-box; background-clip: padding-box;
border: 1px solid var(--color-gray-alpha-400); border: 1px solid var(--color-gray-alpha-400);
box-shadow: var(--shadow-small); box-shadow: var(--shadow-small);
border-radius: var(--rounded-full); border-radius: var(--rounded-full);
svg {
width: var(--size-14);
height: var(--size-14);
}
&:focus { &:focus {
outline: var(--focus-ring); outline: var(--focus-ring);
} }
......
...@@ -21,6 +21,7 @@ function NodeJsIcon(props: any) { ...@@ -21,6 +21,7 @@ function NodeJsIcon(props: any) {
<svg <svg
width="14" width="14"
height="14" height="14"
viewBox="0 0 14 14"
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
{...props} {...props}
...@@ -133,6 +134,7 @@ function NodeJsDisabledIcon(props: any) { ...@@ -133,6 +134,7 @@ function NodeJsDisabledIcon(props: any) {
<svg <svg
width="14" width="14"
height="14" height="14"
viewBox="0 0 14 14"
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
{...props} {...props}
......
...@@ -22,13 +22,13 @@ export function ErrorTypeLabel({ errorType }: ErrorTypeLabelProps) { ...@@ -22,13 +22,13 @@ export function ErrorTypeLabel({ errorType }: ErrorTypeLabelProps) {
export const styles = ` export const styles = `
.nextjs__container_errors_label { .nextjs__container_errors_label {
padding: var(--size-2) var(--size-6); padding: 2px 6px;
margin: 0; margin: 0;
/* used --size instead of --rounded because --rounded is missing 6px */ /* used --size instead of --rounded because --rounded is missing 6px */
border-radius: var(--size-6); border-radius: var(--rounded-md-2);
background: var(--color-red-100); background: var(--color-red-100);
font-weight: 600; font-weight: 600;
font-size: var(--size-11); font-size: var(--size-12);
color: var(--color-red-900); color: var(--color-red-900);
font-family: var(--font-stack-monospace); font-family: var(--font-stack-monospace);
line-height: var(--size-20); line-height: var(--size-20);
......
...@@ -18,76 +18,11 @@ const styles = ` ...@@ -18,76 +18,11 @@ const styles = `
.nextjs-toast-errors-parent { .nextjs-toast-errors-parent {
padding: 16px; padding: 16px;
border-radius: 32px; border-radius: var(--rounded-4xl);
font-weight: 500; font-weight: 500;
color: var(--color-ansi-bright-white); color: var(--color-ansi-bright-white);
background-color: var(--color-ansi-red); background-color: var(--color-ansi-red);
} }
.nextjs-static-indicator-toast-wrapper {
width: 30px;
height: 30px;
overflow: hidden;
border: 0;
border-radius: 24px;
background: var(--color-background);
color: var(--color-font);
transition: all 0.3s ease-in-out;
box-shadow:
inset 0 0 0 1px var(--color-border-shadow),
0 11px 40px 0 rgba(0, 0, 0, 0.25),
0 2px 10px 0 rgba(0, 0, 0, 0.12);
}
.nextjs-static-indicator-toast-wrapper:hover {
width: 140px;
}
.nextjs-static-indicator-toast-icon {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
}
.nextjs-static-indicator-toast-text {
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
white-space: nowrap;
transition: opacity 0.3s ease-in-out;
line-height: 30px;
position: absolute;
left: 30px;
top: 0;
}
.nextjs-static-indicator-toast-wrapper:hover
.nextjs-static-indicator-toast-text {
opacity: 1;
}
.nextjs-static-indicator-toast-wrapper button {
color: var(--color-font);
opacity: 0.8;
background: none;
border: none;
margin-left: 6px;
margin-top: -2px;
outline: 0;
}
.nextjs-static-indicator-toast-wrapper button:focus {
opacity: 1;
}
.nextjs-static-indicator-toast-wrapper button > svg {
width: 16px;
height: 16px;
}
` `
export { styles } export { styles }
...@@ -93,9 +93,9 @@ export const styles = ` ...@@ -93,9 +93,9 @@ export const styles = `
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: var(--size-4); gap: 4px;
height: 26px; height: var(--size-26);
padding: 6px 8px 6px 6px; padding: 6px 8px 6px 6px;
background: var(--color-background-100); background: var(--color-background-100);
background-clip: padding-box; background-clip: padding-box;
...@@ -104,7 +104,7 @@ export const styles = ` ...@@ -104,7 +104,7 @@ export const styles = `
border-radius: var(--rounded-full); border-radius: var(--rounded-full);
color: var(--color-gray-900); color: var(--color-gray-900);
font-size: 12px; font-size: var(--size-12);
font-weight: 500; font-weight: 500;
line-height: var(--size-16); line-height: var(--size-16);
} }
......
...@@ -215,11 +215,11 @@ export const styles = ` ...@@ -215,11 +215,11 @@ export const styles = `
bottom: calc(16px * 4.5); bottom: calc(16px * 4.5);
} }
p.nextjs__container_errors__link { p.nextjs__container_errors__link {
font-size: 14px; font-size: var(--size-14);
} }
p.nextjs__container_errors__notes { p.nextjs__container_errors__notes {
color: var(--color-stack-notes); color: var(--color-stack-notes);
font-size: 14px; font-size: var(--size-14);
line-height: 1.5; line-height: 1.5;
} }
.nextjs-container-errors-body > h2:not(:first-child) { .nextjs-container-errors-body > h2:not(:first-child) {
...@@ -262,7 +262,7 @@ export const styles = ` ...@@ -262,7 +262,7 @@ export const styles = `
background: none; background: none;
border: none; border: none;
color: var(--color-ansi-bright-white); color: var(--color-ansi-bright-white);
font-size: 1.5rem; font-size: var(--size-24);
padding: 0; padding: 0;
margin: 0; margin: 0;
margin-left: 8px; margin-left: 8px;
...@@ -272,10 +272,10 @@ export const styles = ` ...@@ -272,10 +272,10 @@ export const styles = `
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: var(--size-14); margin-bottom: 14px;
} }
.error-overlay-notes-container { .error-overlay-notes-container {
margin: var(--size-8) var(--size-2); margin: 8px 2px;
} }
.error-overlay-notes-container p { .error-overlay-notes-container p {
white-space: pre-wrap; white-space: pre-wrap;
......
...@@ -2,20 +2,20 @@ export { PseudoHtmlDiff } from '../../components/hydration-diff/diff-view' ...@@ -2,20 +2,20 @@ export { PseudoHtmlDiff } from '../../components/hydration-diff/diff-view'
export const PSEUDO_HTML_DIFF_STYLES = ` export const PSEUDO_HTML_DIFF_STYLES = `
[data-nextjs-container-errors-pseudo-html] { [data-nextjs-container-errors-pseudo-html] {
padding: var(--size-8) 0; padding: 8px 0;
margin: var(--size-8) 0; margin: 8px 0;
border: 1px solid var(--color-gray-400); border: 1px solid var(--color-gray-400);
background: var(--color-background-200); background: var(--color-background-200);
color: var(--color-syntax-constant); color: var(--color-syntax-constant);
font-family: var(--font-stack-monospace); font-family: var(--font-stack-monospace);
font-size: var(--size-12); font-size: var(--size-12);
line-height: var(--size-16); line-height: 1.33em; /* 16px in 12px font size */
border-radius: var(--size-8); border-radius: var(--rounded-md-2);
} }
[data-nextjs-container-errors-pseudo-html-line] { [data-nextjs-container-errors-pseudo-html-line] {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
padding-left: var(--size-40); padding-left: 40px;
line-height: calc(5 / 3); line-height: calc(5 / 3);
} }
[data-nextjs-container-errors-pseudo-html--diff='error'] { [data-nextjs-container-errors-pseudo-html--diff='error'] {
...@@ -24,7 +24,7 @@ export const PSEUDO_HTML_DIFF_STYLES = ` ...@@ -24,7 +24,7 @@ export const PSEUDO_HTML_DIFF_STYLES = `
} }
[data-nextjs-container-errors-pseudo-html-collapse-button] { [data-nextjs-container-errors-pseudo-html-collapse-button] {
all: unset; all: unset;
margin-left: var(--size-12); margin-left: 12px;
&:focus { &:focus {
outline: none; outline: none;
} }
...@@ -33,8 +33,8 @@ export const PSEUDO_HTML_DIFF_STYLES = ` ...@@ -33,8 +33,8 @@ export const PSEUDO_HTML_DIFF_STYLES = `
background: var(--color-green-300); background: var(--color-green-300);
} }
[data-nextjs-container-errors-pseudo-html-line-sign] { [data-nextjs-container-errors-pseudo-html-line-sign] {
margin-left: calc(var(--size-24) * -1); margin-left: calc(24px * -1);
margin-right: var(--size-24); margin-right: 24px;
} }
[data-nextjs-container-errors-pseudo-html--diff='add'] [data-nextjs-container-errors-pseudo-html--diff='add']
[data-nextjs-container-errors-pseudo-html-line-sign] { [data-nextjs-container-errors-pseudo-html-line-sign] {
...@@ -46,8 +46,8 @@ export const PSEUDO_HTML_DIFF_STYLES = ` ...@@ -46,8 +46,8 @@ export const PSEUDO_HTML_DIFF_STYLES = `
[data-nextjs-container-errors-pseudo-html--diff='remove'] [data-nextjs-container-errors-pseudo-html--diff='remove']
[data-nextjs-container-errors-pseudo-html-line-sign] { [data-nextjs-container-errors-pseudo-html-line-sign] {
color: var(--color-red-900); color: var(--color-red-900);
margin-left: calc(var(--size-24) * -1); margin-left: calc(24px * -1);
margin-right: var(--size-24); margin-right: 24px;
} }
[data-nextjs-container-errors-pseudo-html--diff='error'] [data-nextjs-container-errors-pseudo-html--diff='error']
[data-nextjs-container-errors-pseudo-html-line-sign] { [data-nextjs-container-errors-pseudo-html-line-sign] {
......
export function ExternalIcon(props: React.SVGProps<SVGSVGElement>) { export function ExternalIcon(props: React.SVGProps<SVGSVGElement>) {
return ( return (
<svg xmlns="http://www.w3.org/2000/svg" {...props}> <svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
{...props}
>
<path <path
fillRule="evenodd" fillRule="evenodd"
clipRule="evenodd" clipRule="evenodd"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment