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