Unverified Commit faae7019 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

[dev-overlay] sync suffix `N` of `--size-N` with `px` value of base font `16px` (#76384)

### Why?

Previously, `--size-4` was 16px in rem, but it wasn't intuitive. Therefore, changed to `--size-16`.
parent e2a3e5e1
...@@ -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-1_5) var(--size-2); padding: var(--size-6) var(--size-8);
margin-bottom: var(--size-1); margin-bottom: var(--size-4);
border-radius: var(--rounded-lg); border-radius: var(--rounded-lg);
} }
...@@ -98,15 +98,15 @@ export const CALL_STACK_FRAME_STYLES = ` ...@@ -98,15 +98,15 @@ 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-1); gap: var(--size-4);
margin-bottom: var(--size-1); margin-bottom: var(--size-4);
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-font-small); font-size: var(--size-14);
font-weight: 500; font-weight: 500;
line-height: var(--size-5); line-height: var(--size-20);
} }
.open-in-editor-button { .open-in-editor-button {
...@@ -129,7 +129,7 @@ export const CALL_STACK_FRAME_STYLES = ` ...@@ -129,7 +129,7 @@ export const CALL_STACK_FRAME_STYLES = `
.call-stack-frame-file-source { .call-stack-frame-file-source {
color: var(--color-gray-900); color: var(--color-gray-900);
font-size: var(--size-font-small); font-size: var(--size-14);
line-height: var(--size-5); line-height: var(--size-20);
} }
` `
...@@ -122,7 +122,7 @@ export const CODE_FRAME_STYLES = ` ...@@ -122,7 +122,7 @@ export const CODE_FRAME_STYLES = `
font-family: var(--font-stack-monospace); font-family: var(--font-stack-monospace);
font-size: 12px; font-size: 12px;
line-height: 16px; line-height: 16px;
margin: var(--size-2) 0; margin: var(--size-8) 0;
} }
.code-frame-link, .code-frame-link,
......
...@@ -54,7 +54,7 @@ const styles = ` ...@@ -54,7 +54,7 @@ const styles = `
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
padding: var(--size-4) var(--size-3); padding: var(--size-16) var(--size-12);
} }
/* Account for the footer height, when present */ /* Account for the footer height, when present */
...@@ -64,7 +64,7 @@ const styles = ` ...@@ -64,7 +64,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-2); margin-bottom: var(--size-8);
} }
[data-nextjs-dialog-content] > [data-nextjs-dialog-body] { [data-nextjs-dialog-content] > [data-nextjs-dialog-body] {
......
...@@ -121,7 +121,7 @@ function ChevronUpDown() { ...@@ -121,7 +121,7 @@ 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-2); margin-top: var(--size-8);
} }
.error-overlay-call-stack-header { .error-overlay-call-stack-header {
...@@ -129,7 +129,7 @@ export const CALL_STACK_STYLES = ` ...@@ -129,7 +129,7 @@ export const CALL_STACK_STYLES = `
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
min-height: 28px; min-height: 28px;
padding: var(--size-2) var(--size-2) var(--size-3) var(--size-1); padding: var(--size-8) var(--size-8) var(--size-12) var(--size-4);
width: 100%; width: 100%;
} }
...@@ -137,14 +137,14 @@ export const CALL_STACK_STYLES = ` ...@@ -137,14 +137,14 @@ 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-2); gap: var(--size-8);
margin: 0; margin: 0;
color: var(--color-gray-1000); color: var(--color-gray-1000);
font-size: var(--size-font); font-size: var(--size-16);
font-weight: 500; font-weight: 500;
line-height: var(--size-5); line-height: var(--size-20);
} }
.error-overlay-call-stack-count { .error-overlay-call-stack-count {
...@@ -154,13 +154,13 @@ export const CALL_STACK_STYLES = ` ...@@ -154,13 +154,13 @@ export const CALL_STACK_STYLES = `
width: 20px; width: 20px;
height: 20px; height: 20px;
gap: var(--size-1); gap: var(--size-4);
color: var(--color-gray-1000); color: var(--color-gray-1000);
text-align: center; text-align: center;
font-size: var(--size-font-11); font-size: var(--size-11);
font-weight: 500; font-weight: 500;
line-height: var(--size-4); line-height: var(--size-16);
border-radius: var(--rounded-full); border-radius: var(--rounded-full);
background: var(--color-gray-300); background: var(--color-gray-300);
...@@ -172,8 +172,8 @@ export const CALL_STACK_STYLES = ` ...@@ -172,8 +172,8 @@ export const CALL_STACK_STYLES = `
align-items: center; align-items: center;
gap: 6px; gap: 6px;
color: var(--color-gray-900); color: var(--color-gray-900);
font-size: var(--size-font-small); font-size: var(--size-14);
line-height: var(--size-5); line-height: var(--size-20);
border-radius: 6px; border-radius: 6px;
padding: 4px 6px; padding: 4px 6px;
margin-right: -6px; margin-right: -6px;
......
...@@ -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-2_5)', [vertical]: 'var(--size-10)',
[horizontal]: 'var(--size-5)', [horizontal]: 'var(--size-20)',
}} }}
> >
<NextLogo <NextLogo
...@@ -292,7 +292,7 @@ function DevToolsPopover({ ...@@ -292,7 +292,7 @@ function DevToolsPopover({
setIsOpen={setIsRouteInfoOpen} setIsOpen={setIsRouteInfoOpen}
setPreviousOpen={setIsMenuOpen} setPreviousOpen={setIsMenuOpen}
style={{ style={{
[vertical]: 'calc(100% + var(--size-gap))', [vertical]: 'calc(100% + 8px)',
[horizontal]: 0, [horizontal]: 0,
}} }}
data-rendered={routeInfoRendered} data-rendered={routeInfoRendered}
...@@ -306,7 +306,7 @@ function DevToolsPopover({ ...@@ -306,7 +306,7 @@ function DevToolsPopover({
setIsOpen={setIsTurbopackInfoOpen} setIsOpen={setIsTurbopackInfoOpen}
setPreviousOpen={setIsMenuOpen} setPreviousOpen={setIsMenuOpen}
style={{ style={{
[vertical]: 'calc(100% + var(--size-gap))', [vertical]: 'calc(100% + 8px)',
[horizontal]: 0, [horizontal]: 0,
}} }}
data-rendered={turbopackInfoRendered} data-rendered={turbopackInfoRendered}
...@@ -329,7 +329,7 @@ function DevToolsPopover({ ...@@ -329,7 +329,7 @@ function DevToolsPopover({
{ {
'--animate-out-duration-ms': `${ANIMATE_OUT_DURATION_MS}ms`, '--animate-out-duration-ms': `${ANIMATE_OUT_DURATION_MS}ms`,
'--animate-out-timing-function': ANIMATE_OUT_TIMING_FUNCTION, '--animate-out-timing-function': ANIMATE_OUT_TIMING_FUNCTION,
[vertical]: 'calc(100% + var(--size-gap))', [vertical]: 'calc(100% + 8px)',
[horizontal]: 0, [horizontal]: 0,
} as React.CSSProperties } as React.CSSProperties
} }
...@@ -616,14 +616,14 @@ export const DEV_TOOLS_INDICATOR_STYLES = ` ...@@ -616,14 +616,14 @@ export const DEV_TOOLS_INDICATOR_STYLES = `
} }
.dev-tools-indicator-label { .dev-tools-indicator-label {
font-size: var(--size-font-small); font-size: var(--size-14);
line-height: var(--size-5); line-height: var(--size-20);
color: var(--color-gray-1000); color: var(--color-gray-1000);
} }
.dev-tools-indicator-value { .dev-tools-indicator-value {
font-size: var(--size-font-small); font-size: var(--size-14);
line-height: var(--size-5); line-height: var(--size-20);
color: var(--color-gray-900); color: var(--color-gray-900);
margin-left: auto; margin-left: auto;
} }
...@@ -665,11 +665,11 @@ export const DEV_TOOLS_INDICATOR_STYLES = ` ...@@ -665,11 +665,11 @@ export const DEV_TOOLS_INDICATOR_STYLES = `
.dev-tools-indicator-shortcut { .dev-tools-indicator-shortcut {
display: flex; display: flex;
gap: var(--size-1); gap: var(--size-4);
kbd { kbd {
width: var(--size-5); width: var(--size-20);
height: var(--size-5); height: var(--size-20);
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -679,8 +679,8 @@ export const DEV_TOOLS_INDICATOR_STYLES = ` ...@@ -679,8 +679,8 @@ export const DEV_TOOLS_INDICATOR_STYLES = `
background: var(--color-background-100); background: var(--color-background-100);
color: var(--color-gray-1000); color: var(--color-gray-1000);
text-align: center; text-align: center;
font-size: var(--size-font-smaller); font-size: var(--size-12);
line-height: var(--size-4); line-height: var(--size-16);
} }
} }
` `
...@@ -69,11 +69,11 @@ export const DEV_TOOLS_INFO_STYLES = ` ...@@ -69,11 +69,11 @@ export const DEV_TOOLS_INFO_STYLES = `
} }
.dev-tools-info-container { .dev-tools-info-container {
padding: var(--size-1_5); padding: var(--size-6);
} }
.dev-tools-info-title { .dev-tools-info-title {
padding: var(--size-2) var(--size-1_5); padding: var(--size-8) var(--size-6);
color: var(--color-gray-1000); color: var(--color-gray-1000);
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
...@@ -82,7 +82,7 @@ export const DEV_TOOLS_INFO_STYLES = ` ...@@ -82,7 +82,7 @@ export const DEV_TOOLS_INFO_STYLES = `
} }
.dev-tools-info-article { .dev-tools-info-article {
padding: var(--size-2) var(--size-1_5); padding: var(--size-8) var(--size-6);
color: var(--color-gray-1000); color: var(--color-gray-1000);
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
...@@ -98,11 +98,11 @@ export const DEV_TOOLS_INFO_STYLES = ` ...@@ -98,11 +98,11 @@ 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-2) var(--size-1_5); padding: var(--size-8) var(--size-6);
} }
.dev-tools-info-close-button { .dev-tools-info-close-button {
padding: 0 var(--size-2); padding: 0 var(--size-8);
height: 28px; height: 28px;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
...@@ -120,7 +120,7 @@ export const DEV_TOOLS_INFO_STYLES = ` ...@@ -120,7 +120,7 @@ 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-2); padding: 0 var(--size-8);
height: 28px; height: 28px;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
......
...@@ -115,7 +115,7 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = ` ...@@ -115,7 +115,7 @@ 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-0_5) var(--size-1); padding: var(--size-2) var(--size-4);
margin: 0; margin: 0;
font-size: 13px; font-size: 13px;
white-space: break-spaces; white-space: break-spaces;
...@@ -123,7 +123,7 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = ` ...@@ -123,7 +123,7 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = `
} }
.dev-tools-info-code-block-container { .dev-tools-info-code-block-container {
padding: var(--size-1_5); padding: var(--size-6);
} }
.dev-tools-info-code-block { .dev-tools-info-code-block {
...@@ -146,11 +146,11 @@ export const DEV_TOOLS_INFO_TURBOPACK_INFO_STYLES = ` ...@@ -146,11 +146,11 @@ 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-2); right: var(--size-8);
top: var(--size-2); top: var(--size-8);
padding: var(--size-1); padding: var(--size-4);
height: var(--size-6); height: var(--size-24);
width: var(--size-6); width: var(--size-24);
border-radius: var(--rounded-md-2); border-radius: var(--rounded-md-2);
border: 1px solid var(--color-gray-alpha-400); border: 1px solid var(--color-gray-alpha-400);
background: var(--color-background-100); background: var(--color-background-100);
......
...@@ -19,23 +19,23 @@ export const DIALOG_HEADER_STYLES = ` ...@@ -19,23 +19,23 @@ export const DIALOG_HEADER_STYLES = `
position: relative; position: relative;
} }
.nextjs-container-errors-header > h1 { .nextjs-container-errors-header > h1 {
font-size: var(--size-font-big); font-size: var(--size-20);
line-height: var(--size-font-bigger); line-height: var(--size-24);
font-weight: bold; font-weight: bold;
margin: calc(var(--size-gap-double) * 1.5) 0; margin: calc(16px * 1.5) 0;
color: var(--color-title-h1); color: var(--color-title-h1);
} }
.nextjs-container-errors-header small { .nextjs-container-errors-header small {
font-size: var(--size-font-small); font-size: var(--size-14);
color: var(--color-accents-1); color: var(--color-accents-1);
margin-left: var(--size-gap-double); margin-left: 16px;
} }
.nextjs-container-errors-header small > span { .nextjs-container-errors-header small > span {
font-family: var(--font-stack-monospace); font-family: var(--font-stack-monospace);
} }
.nextjs-container-errors-header > div > small { .nextjs-container-errors-header > div > small {
margin: 0; margin: 0;
margin-top: var(--size-gap-half); margin-top: 4px;
} }
.nextjs-container-errors-header > p > a { .nextjs-container-errors-header > p > a {
color: inherit; color: inherit;
...@@ -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-4); top: var(--size-16);
right: var(--size-4); right: var(--size-16);
} }
` `
...@@ -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-0_5) var(--size-1_5); padding: var(--size-2) var(--size-6);
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-1_5); border-radius: var(--size-6);
background: var(--color-gray-300); background: var(--color-gray-300);
font-weight: 600; font-weight: 600;
font-size: var(--size-font-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-5); line-height: var(--size-20);
} }
` `
...@@ -50,12 +50,12 @@ export const styles = ` ...@@ -50,12 +50,12 @@ export const styles = `
.nextjs__container_errors_desc { .nextjs__container_errors_desc {
margin: 0; margin: 0;
margin-left: var(--size-1); margin-left: var(--size-4);
color: var(--color-red-900); color: var(--color-red-900);
font-weight: 500; font-weight: 500;
font-size: var(--size-font); font-size: var(--size-16);
letter-spacing: -0.32px; letter-spacing: -0.32px;
line-height: var(--size-6); line-height: var(--size-24);
overflow-wrap: break-word; overflow-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
} }
......
...@@ -38,11 +38,11 @@ export const styles = ` ...@@ -38,11 +38,11 @@ export const styles = `
} }
.error-overlay-bottom-stack-layer-1 { .error-overlay-bottom-stack-layer-1 {
width: calc(100% - var(--size-6)); width: calc(100% - var(--size-24));
} }
.error-overlay-bottom-stack-layer-2 { .error-overlay-bottom-stack-layer-2 {
width: calc(100% - var(--size-12)); width: calc(100% - var(--size-48));
z-index: -1; z-index: -1;
} }
......
...@@ -107,7 +107,7 @@ export const styles = ` ...@@ -107,7 +107,7 @@ export const styles = `
.error-feedback { .error-feedback {
display: flex; display: flex;
align-items: center; align-items: center;
gap: var(--size-gap); gap: 8px;
white-space: nowrap; white-space: nowrap;
color: var(--color-gray-900); color: var(--color-gray-900);
} }
......
...@@ -28,8 +28,8 @@ export const styles = ` ...@@ -28,8 +28,8 @@ export const styles = `
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
gap: var(--size-gap); gap: 8px;
padding: var(--size-3); padding: var(--size-12);
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);
} }
...@@ -49,7 +49,7 @@ export const styles = ` ...@@ -49,7 +49,7 @@ export const styles = `
margin: 0; margin: 0;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
line-height: var(--size-font-big); line-height: var(--size-20);
} }
${feedbackStyles} ${feedbackStyles}
......
...@@ -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-2); gap: var(--size-8);
} }
` `
...@@ -49,7 +49,7 @@ export const Default: Story = { ...@@ -49,7 +49,7 @@ export const Default: Story = {
decorators: [ decorators: [
(Story) => ( (Story) => (
// Offset the translateY applied to the floating header. // Offset the translateY applied to the floating header.
<div style={{ paddingTop: 'var(--size-10_5)' }}> <div style={{ paddingTop: 'var(--size-42)' }}>
<Story /> <Story />
</div> </div>
), ),
......
...@@ -164,7 +164,7 @@ export const styles = ` ...@@ -164,7 +164,7 @@ export const styles = `
.error-overlay-pagination-count { .error-overlay-pagination-count {
color: var(--color-gray-900); color: var(--color-gray-900);
text-align: center; text-align: center;
font-size: var(--size-font-small); font-size: var(--size-14);
font-weight: 500; font-weight: 500;
line-height: 16px; line-height: 16px;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
......
...@@ -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-1_5); gap: var(--size-6);
} }
.nodejs-inspector-button, .nodejs-inspector-button,
......
...@@ -22,15 +22,15 @@ export function ErrorTypeLabel({ errorType }: ErrorTypeLabelProps) { ...@@ -22,15 +22,15 @@ export function ErrorTypeLabel({ errorType }: ErrorTypeLabelProps) {
export const styles = ` export const styles = `
.nextjs__container_errors_label { .nextjs__container_errors_label {
padding: var(--size-0_5) var(--size-1_5); padding: var(--size-2) var(--size-6);
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-1_5); border-radius: var(--size-6);
background: var(--color-red-100); background: var(--color-red-100);
font-weight: 600; font-weight: 600;
font-size: var(--size-font-11); font-size: var(--size-11);
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-5); line-height: var(--size-20);
} }
` `
...@@ -46,8 +46,8 @@ export function EditorLink({ file, location }: EditorLinkProps) { ...@@ -46,8 +46,8 @@ export function EditorLink({ file, location }: EditorLinkProps) {
export const EDITOR_LINK_STYLES = ` export const EDITOR_LINK_STYLES = `
[data-with-open-in-editor-link] svg { [data-with-open-in-editor-link] svg {
width: auto; width: auto;
height: var(--size-font-small); height: var(--size-14);
margin-left: var(--size-gap); margin-left: 8px;
} }
[data-with-open-in-editor-link] { [data-with-open-in-editor-link] {
cursor: pointer; cursor: pointer;
...@@ -56,6 +56,6 @@ export const EDITOR_LINK_STYLES = ` ...@@ -56,6 +56,6 @@ export const EDITOR_LINK_STYLES = `
text-decoration: underline dotted; text-decoration: underline dotted;
} }
[data-with-open-in-editor-link-import-trace] { [data-with-open-in-editor-link-import-trace] {
margin-left: var(--size-gap-double); margin-left: 16px;
} }
` `
const styles = ` const styles = `
.nextjs-toast { .nextjs-toast {
position: fixed; position: fixed;
bottom: var(--size-gap-double); bottom: 16px;
left: var(--size-gap-double); left: 16px;
max-width: 420px; max-width: 420px;
z-index: 9000; z-index: 9000;
box-shadow: 0px var(--size-gap-double) var(--size-gap-quad) box-shadow: 0px 16px 32px
rgba(0, 0, 0, 0.25); rgba(0, 0, 0, 0.25);
} }
...@@ -18,7 +18,7 @@ const styles = ` ...@@ -18,7 +18,7 @@ const styles = `
.nextjs-toast-errors-parent { .nextjs-toast-errors-parent {
padding: 16px; padding: 16px;
border-radius: var(--size-gap-quad); border-radius: 32px;
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);
...@@ -29,7 +29,7 @@ const styles = ` ...@@ -29,7 +29,7 @@ const styles = `
height: 30px; height: 30px;
overflow: hidden; overflow: hidden;
border: 0; border: 0;
border-radius: var(--size-gap-triple); border-radius: 24px;
background: var(--color-background); background: var(--color-background);
color: var(--color-font); color: var(--color-font);
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
......
...@@ -93,7 +93,7 @@ export const styles = ` ...@@ -93,7 +93,7 @@ export const styles = `
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: var(--size-1); gap: var(--size-4);
height: 26px; height: 26px;
padding: 6px 8px 6px 6px; padding: 6px 8px 6px 6px;
...@@ -106,7 +106,7 @@ export const styles = ` ...@@ -106,7 +106,7 @@ export const styles = `
color: var(--color-gray-900); color: var(--color-gray-900);
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
line-height: var(--size-4); line-height: var(--size-16);
} }
a.nextjs-container-build-error-version-status { a.nextjs-container-build-error-version-status {
......
...@@ -212,7 +212,7 @@ export function Errors({ ...@@ -212,7 +212,7 @@ export function Errors({
export const styles = ` export const styles = `
.nextjs-error-with-static { .nextjs-error-with-static {
bottom: calc(var(--size-gap-double) * 4.5); bottom: calc(16px * 4.5);
} }
p.nextjs__container_errors__link { p.nextjs__container_errors__link {
font-size: 14px; font-size: 14px;
...@@ -223,12 +223,12 @@ export const styles = ` ...@@ -223,12 +223,12 @@ export const styles = `
line-height: 1.5; line-height: 1.5;
} }
.nextjs-container-errors-body > h2:not(:first-child) { .nextjs-container-errors-body > h2:not(:first-child) {
margin-top: calc(var(--size-gap-double) + var(--size-gap)); margin-top: calc(16px + 8px);
} }
.nextjs-container-errors-body > h2 { .nextjs-container-errors-body > h2 {
color: var(--color-title-color); color: var(--color-title-color);
margin-bottom: var(--size-gap); margin-bottom: 8px;
font-size: var(--size-font-big); font-size: var(--size-20);
} }
.nextjs-toast-errors-parent { .nextjs-toast-errors-parent {
cursor: pointer; cursor: pointer;
...@@ -243,10 +243,10 @@ export const styles = ` ...@@ -243,10 +243,10 @@ export const styles = `
justify-content: flex-start; justify-content: flex-start;
} }
.nextjs-toast-errors > svg { .nextjs-toast-errors > svg {
margin-right: var(--size-gap); margin-right: 8px;
} }
.nextjs-toast-hide-button { .nextjs-toast-hide-button {
margin-left: var(--size-gap-triple); margin-left: 24px;
border: none; border: none;
background: none; background: none;
color: var(--color-ansi-bright-white); color: var(--color-ansi-bright-white);
...@@ -265,17 +265,17 @@ export const styles = ` ...@@ -265,17 +265,17 @@ export const styles = `
font-size: 1.5rem; font-size: 1.5rem;
padding: 0; padding: 0;
margin: 0; margin: 0;
margin-left: var(--size-gap); margin-left: 8px;
transition: opacity 0.25s ease; transition: opacity 0.25s ease;
} }
.nextjs__container_errors__error_title { .nextjs__container_errors__error_title {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: var(--size-3_5); margin-bottom: var(--size-14);
} }
.error-overlay-notes-container { .error-overlay-notes-container {
margin: var(--size-2) var(--size-0_5); margin: var(--size-8) var(--size-2);
} }
.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-2) 0; padding: var(--size-8) 0;
margin: var(--size-2) 0; margin: var(--size-8) 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-font-smaller); font-size: var(--size-12);
line-height: var(--size-4); line-height: var(--size-16);
border-radius: var(--size-2); border-radius: var(--size-8);
} }
[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-10); padding-left: var(--size-40);
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-3); margin-left: var(--size-12);
&: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-6) * -1); margin-left: calc(var(--size-24) * -1);
margin-right: var(--size-6); margin-right: var(--size-24);
} }
[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-6) * -1); margin-left: calc(var(--size-24) * -1);
margin-right: var(--size-6); margin-right: var(--size-24);
} }
[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] {
......
import * as React from 'react'
import { css } from '../../utils/css' import { css } from '../../utils/css'
export function Base() { export function Base() {
...@@ -6,27 +5,14 @@ export function Base() { ...@@ -6,27 +5,14 @@ export function Base() {
<style> <style>
{css` {css`
:host { :host {
${ /*
// Although the style applied to the shadow host is isolated, Although the style applied to the shadow host is isolated,
// the element that attached the shadow host (i.e. `nextjs-portal`) the element that attached the shadow host (i.e. "nextjs-portal")
// is still affected by the parent's style (e.g. `body`). This may is still affected by the parent's style (e.g. "body"). This may
// occur style conflicts like `display: flex`, with other children occur style conflicts like "display: flex", with other children
// elements therefore give the shadow host an absolute position. elements therefore give the shadow host an absolute position.
'position: absolute;' */
} position: absolute;
--size-gap-half: 4px;
--size-gap: 8px;
--size-gap-double: 16px;
--size-gap-triple: 24px;
--size-gap-quad: 32px;
--size-font-11: 11px;
--size-font-smaller: 12px;
--size-font-small: 14px;
--size-font: 16px;
--size-font-big: 20px;
--size-font-bigger: 24px;
--color-font: #757575; --color-font: #757575;
--color-backdrop: rgba(250, 250, 250, 0.8); --color-backdrop: rgba(250, 250, 250, 0.8);
...@@ -73,41 +59,55 @@ export function Base() { ...@@ -73,41 +59,55 @@ export function Base() {
--timing-overlay: cubic-bezier(0.175, 0.885, 0.32, 1.1); --timing-overlay: cubic-bezier(0.175, 0.885, 0.32, 1.1);
--rounded-none: 0px; --rounded-none: 0px;
--rounded-sm: 0.125rem; /* 2px */ --rounded-sm: 2px;
--rounded-md: 0.25rem; /* 4px */ --rounded-md: 4px;
--rounded-md-2: 0.375rem; /* 6px */ --rounded-md-2: 6px;
--rounded-lg: 0.5rem; /* 8px */ --rounded-lg: 8px;
--rounded-xl: 0.75rem; /* 12px */ --rounded-xl: 12px;
--rounded-2xl: 1rem; /* 16px */ --rounded-2xl: 16px;
--rounded-3xl: 1.5rem; /* 24px */ --rounded-3xl: 24px;
--rounded-4xl: 32px;
--rounded-full: 9999px; --rounded-full: 9999px;
--size-0: 0px; /*
--size-px: 1px; Suffix N of --size-N as px value when the base font size is 16px.
--size-0_5: 0.125rem; /* 2px */ Example: --size-1 is 1px, --size-2 is 2px, --size-3 is 3px, etc.
--size-1: 0.25rem; /* 4px */ */
--size-1_5: 0.375rem; /* 6px */ --size-1: 0.0625rem; /* 1px */
--size-2: 0.5rem; /* 8px */ --size-2: 0.125rem; /* 2px */
--size-2_5: 0.625rem; /* 10px */ --size-3: 0.1875rem; /* 3px */
--size-3: 0.75rem; /* 12px */ --size-4: 0.25rem; /* ...and more */
--size-3_5: 0.875rem; /* 14px */ --size-5: 0.3125rem;
--size-4: 1rem; /* 16px */ --size-6: 0.375rem;
--size-4_5: 1.125rem; /* 18px */ --size-7: 0.4375rem;
--size-5: 1.25rem; /* 20px */ --size-8: 0.5rem;
--size-5_5: 1.375rem; /* 22px */ --size-9: 0.5625rem;
--size-6: 1.5rem; /* 24px */ --size-10: 0.625rem;
--size-6_5: 1.625rem; /* 26px */ --size-11: 0.6875rem;
--size-7: 1.75rem; /* 28px */ --size-12: 0.75rem;
--size-7_5: 1.875rem; /* 30px */ --size-13: 0.8125rem;
--size-8: 2rem; /* 32px */ --size-14: 0.875rem;
--size-8_5: 2.125rem; /* 34px */ --size-15: 0.9375rem;
--size-9: 2.25rem; /* 36px */ /* If the base font size of the dev overlay changes e.g. 18px,
--size-9_5: 2.375rem; /* 38px */ just slide the window and make --size-18 as 1rem. */
--size-10: 2.5rem; /* 40px */ --size-16: 1rem;
--size-10_5: 2.625rem; /* 42px */ --size-17: 1.0625rem;
--size-11: 2.75rem; /* 44px */ --size-18: 1.125rem;
--size-11_5: 2.875rem; /* 46px */ --size-20: 1.25rem;
--size-12: 3rem; /* 48px */ --size-22: 1.375rem;
--size-24: 1.5rem;
--size-26: 1.625rem;
--size-28: 1.75rem;
--size-30: 1.875rem;
--size-32: 2rem;
--size-34: 2.125rem;
--size-36: 2.25rem;
--size-38: 2.375rem;
--size-40: 2.5rem;
--size-42: 2.625rem;
--size-44: 2.75rem;
--size-46: 2.875rem;
--size-48: 3rem;
@media print { @media print {
display: none; display: none;
...@@ -131,7 +131,7 @@ export function Base() { ...@@ -131,7 +131,7 @@ export function Base() {
h4, h4,
h5, h5,
h6 { h6 {
margin-bottom: var(--size-gap); margin-bottom: 8px;
font-weight: 500; font-weight: 500;
line-height: 1.5; line-height: 1.5;
} }
......
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