|
@ -2,282 +2,258 @@ |
|
|
* Copyright (c) Facebook, Inc. and its affiliates. |
|
|
* Copyright (c) Facebook, Inc. and its affiliates. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Theme |
|
|
|
|
|
*/ |
|
|
html .sp-wrapper { |
|
|
html .sp-wrapper { |
|
|
color-scheme: inherit; |
|
|
color-scheme: inherit; |
|
|
|
|
|
-webkit-font-smoothing: antialiased; |
|
|
|
|
|
|
|
|
|
|
|
--sp-colors-accent: #087ea4; |
|
|
|
|
|
--sp-colors-clickable: #959da5; |
|
|
|
|
|
--sp-colors-disabled: #24292e; |
|
|
|
|
|
--sp-colors-error: #811e18; |
|
|
|
|
|
--sp-colors-error-surface: #ffcdca; |
|
|
|
|
|
--sp-colors-surface1: #fff; |
|
|
|
|
|
--sp-colors-surface2: #e4e7eb; |
|
|
|
|
|
|
|
|
/* palette */ |
|
|
--sp-syntax-color-plain: #24292e; |
|
|
--sp-colors-fg-active: #24292e !important; |
|
|
--sp-syntax-color-comment: #6a737d; |
|
|
--sp-colors-fg-default: #959da5 !important; |
|
|
--sp-syntax-color-keyword: #d73a49; |
|
|
--sp-colors-fg-inactive: #e4e7eb !important; |
|
|
--sp-syntax-color-tag: #22863a; |
|
|
--sp-colors-bg-active: #e4e7eb !important; |
|
|
--sp-syntax-color-punctuation: #24292e; |
|
|
--sp-colors-bg-default: #ffffff !important; |
|
|
--sp-syntax-color-definition: #6f42c1; |
|
|
--sp-colors-bg-default-overlay: #ffffff !important; |
|
|
--sp-syntax-color-property: #005cc5; |
|
|
--sp-colors-bg-input: #ffffff !important; |
|
|
--sp-syntax-color-static: #032f62; |
|
|
--sp-colors-accent: #c8c8fa !important; |
|
|
--sp-syntax-color-string: #032f62; |
|
|
--sp-colors-bg-error: #ffcdca !important; |
|
|
|
|
|
--sp-colors-fg-error: #811e18 !important; |
|
|
|
|
|
/* syntax */ |
|
|
|
|
|
--theme-plain: #24292e; |
|
|
|
|
|
--theme-comment: #6a737d; |
|
|
|
|
|
--theme-keyword: #d73a49; |
|
|
|
|
|
--theme-tag: #22863a; |
|
|
|
|
|
--theme-punctuation: #24292e; |
|
|
|
|
|
--theme-definition: #6f42c1; |
|
|
|
|
|
--theme-property: #005cc5; |
|
|
|
|
|
--theme-static: #032f62; |
|
|
|
|
|
--theme-string: #032f62; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
html.dark .sp-wrapper { |
|
|
html.dark .sp-wrapper { |
|
|
--sp-colors-fg-active: #ffffff !important; |
|
|
--sp-colors-accent: #149eca; |
|
|
--sp-colors-fg-default: #999999 !important; |
|
|
--sp-colors-clickable: #999; |
|
|
--sp-colors-fg-inactive: #343434 !important; |
|
|
--sp-colors-disabled: #fff; |
|
|
--sp-colors-bg-active: #343434 !important; |
|
|
--sp-colors-error: #811e18; |
|
|
--sp-colors-bg-default: #16181d !important; |
|
|
--sp-colors-error-surface: #ffcdca; |
|
|
--sp-colors-bg-default-overlay: #16181d !important; |
|
|
--sp-colors-surface1: #16181d; |
|
|
--sp-colors-bg-input: #242424 !important; |
|
|
--sp-colors-surface2: #343a46; |
|
|
--sp-colors-accent: #6caedd !important; |
|
|
|
|
|
--sp-colors-bg-error: #ffcdca !important; |
|
|
--sp-syntax-color-plain: #ffffff; |
|
|
--sp-colors-fg-error: #811e18 !important; |
|
|
--sp-syntax-color-comment: #757575; |
|
|
/* syntax */ |
|
|
--sp-syntax-color-keyword: #77b7d7; |
|
|
--theme-plain: #ffffff; |
|
|
--sp-syntax-color-tag: #dfab5c; |
|
|
--theme-comment: #757575; |
|
|
--sp-syntax-color-punctuation: #ffffff; |
|
|
--theme-keyword: #77b7d7; |
|
|
--sp-syntax-color-definition: #86d9ca; |
|
|
--theme-tag: #dfab5c; |
|
|
--sp-syntax-color-property: #77b7d7; |
|
|
--theme-punctuation: #ffffff; |
|
|
--sp-syntax-color-static: #c64640; |
|
|
--theme-definition: #86d9ca; |
|
|
--sp-syntax-color-string: #977cdc; |
|
|
--theme-property: #77b7d7; |
|
|
} |
|
|
--theme-static: #c64640; |
|
|
|
|
|
--theme-string: #977cdc; |
|
|
/** |
|
|
} |
|
|
* Reset |
|
|
|
|
|
*/ |
|
|
.sp-tabs, |
|
|
.sandpack--playground .sp-layout, |
|
|
.sp-tab-button:hover { |
|
|
.sandpack--playground .sp-tabs, |
|
|
background: none !important; |
|
|
.sandpack--playground .cm-activeLine, |
|
|
|
|
|
.sandpack .cm-editor, |
|
|
|
|
|
.sandpack--playground .cm-editor .cm-matchingBracket { |
|
|
|
|
|
border: none; |
|
|
|
|
|
background-color: transparent; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sandpack--playground .cm-content { |
|
|
|
|
|
caret-color: initial; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Layout |
|
|
|
|
|
*/ |
|
|
|
|
|
.sandpack .sp-wrapper { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
.sandpack .sp-layout { |
|
|
|
|
|
overflow: visible; |
|
|
|
|
|
-webkit-mask-image: -webkit-radial-gradient( |
|
|
|
|
|
var(--sp-colors-surface1), |
|
|
|
|
|
var(--sp-colors-surface1) |
|
|
|
|
|
); /* safest way to make all corner rounded */ |
|
|
|
|
|
|
|
|
|
|
|
border-bottom-left-radius: 0.5rem; |
|
|
|
|
|
border-bottom-right-radius: 0.5rem; |
|
|
|
|
|
} |
|
|
|
|
|
.sandpack .sp-layout > .sp-stack { |
|
|
|
|
|
flex: 1 1 0px; |
|
|
|
|
|
height: var(--sp-layout-height); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sandpack .sp-layout > :not(:first-child) { |
|
|
|
|
|
border-left: 1px solid var(--sp-colors-surface2); |
|
|
|
|
|
border-top: 1px solid var(--sp-colors-surface2); |
|
|
|
|
|
margin-left: -1px; |
|
|
|
|
|
margin-top: -1px; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sandpack .sp-cm { |
|
|
|
|
|
padding-left: 8px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Focus ring |
|
|
|
|
|
*/ |
|
|
|
|
|
.sandpack--playground .sp-tab-button { |
|
|
|
|
|
transition: none; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sandpack--playground .sp-tab-button:focus { |
|
|
|
|
|
outline: revert; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sandpack--playground .sp-tab-button:focus-visible { |
|
|
|
|
|
box-shadow: none; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sandpack .sp-cm:focus-visible { |
|
|
|
|
|
box-shadow: inset 0 0 0 4px rgba(20, 158, 202, 0.4); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Navigation |
|
|
|
|
|
*/ |
|
|
|
|
|
.sandpack--playground .sp-tabs-scrollable-container { |
|
|
|
|
|
padding: 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-tabs .sp-tab-button { |
|
|
.sp-tabs .sp-tab-button { |
|
|
color: #087ea4; |
|
|
|
|
|
padding: 0 4px; |
|
|
padding: 0 4px; |
|
|
border-bottom: 2px solid transparent; |
|
|
border-bottom: 2px solid transparent; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
html.dark .sp-tabs .sp-tab-button { |
|
|
@media (min-width: 768px) { |
|
|
color: #149eca; |
|
|
.sp-tabs .sp-tab-button { |
|
|
|
|
|
margin: 0 12px 0 0; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-tabs .sp-tab-button:hover { |
|
|
.sp-tabs .sp-tab-button, |
|
|
color: #087ea4; |
|
|
.sp-tabs .sp-tab-button:hover:not(:disabled, [data-active='true']), |
|
|
|
|
|
.sp-tabs .sp-tab-button[data-active='true'] { |
|
|
|
|
|
color: var(--sp-colors-accent); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
html.dark .sp-tabs .sp-tab-button:hover { |
|
|
.sp-tabs .sp-tab-button[data-active='true'] { |
|
|
color: #149eca; |
|
|
border-bottom: 2px solid var(--sp-colors-accent); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-tabs .sp-tab-button[data-active='true'] { |
|
|
/** |
|
|
color: #087ea4; |
|
|
* Editor |
|
|
border-bottom: 2px solid #087ea4; |
|
|
*/ |
|
|
|
|
|
.sandpack .sp-code-editor .cm-content, |
|
|
|
|
|
.sandpack .sp-code-editor .cm-gutters, |
|
|
|
|
|
.sandpack .sp-code-editor .cm-gutterElement { |
|
|
|
|
|
padding: 0; |
|
|
|
|
|
-webkit-font-smoothing: auto; /* Improve the legibility */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
html.dark .sp-tabs .sp-tab-button[data-active='true'] { |
|
|
.sandpack--playground .sp-code-editor .cm-line { |
|
|
color: #149eca; |
|
|
padding: 0 var(--sp-space-3); |
|
|
border-bottom: 2px solid #149eca; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-stack .sp-code-editor, |
|
|
.sandpack--playground .sp-code-editor .cm-lineNumbers { |
|
|
.sp-tabs .sp-tabs-scrollable-container { |
|
|
padding-left: var(--sp-space-1); |
|
|
overflow: hidden; |
|
|
padding-right: var(--sp-space-1); |
|
|
|
|
|
font-size: 13.6px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-code-editor .cm-errorLine { |
|
|
.sandpack--playground .sp-code-editor .cm-line.cm-errorLine { |
|
|
background-color: rgba(255, 107, 99, 0.1); |
|
|
@apply bg-red-400; |
|
|
|
|
|
--tw-bg-opacity: 0.1; /* Background tweak: base color + opacity */ |
|
|
position: relative; |
|
|
position: relative; |
|
|
padding-right: 2em !important; |
|
|
padding-right: 2em; |
|
|
display: inline-block; |
|
|
display: inline-block; |
|
|
min-width: 100%; |
|
|
min-width: 100%; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-code-editor .cm-errorLine:after { |
|
|
.sp-code-editor .cm-errorLine:after { |
|
|
|
|
|
@apply text-red-500; |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
right: 8px; |
|
|
right: 8px; |
|
|
top: 0; |
|
|
top: 0; |
|
|
content: '\26A0'; |
|
|
content: '\26A0'; |
|
|
font-size: 22px; |
|
|
font-size: 22px; |
|
|
line-height: 20px; |
|
|
line-height: 20px; |
|
|
color: #ff3d3d; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-code-editor .cm-tooltip { |
|
|
.sp-code-editor .cm-tooltip { |
|
|
border: 0; |
|
|
border: 0; |
|
|
max-width: 200px; |
|
|
max-width: 200px; |
|
|
} |
|
|
} |
|
|
html.dark .sp-code-editor .cm-diagnostic { |
|
|
|
|
|
color: var(--sp-colors-bg-default); |
|
|
|
|
|
} |
|
|
|
|
|
.sp-code-editor .cm-diagnostic-error { |
|
|
.sp-code-editor .cm-diagnostic-error { |
|
|
@apply border-red-40; |
|
|
@apply border-red-40; |
|
|
} |
|
|
} |
|
|
.sp-code-editor .cm-diagnostic-warning { |
|
|
|
|
|
border-left: 5px solid orange; |
|
|
.sp-code-editor .sp-cm .cm-scroller { |
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
padding: 18px 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
/** |
|
|
* These are manually adjusted to match the final |
|
|
* Loading component |
|
|
* rendered version without any layout shifts. |
|
|
|
|
|
* Note this affects both sandboxes and code blocks. |
|
|
|
|
|
* |
|
|
|
|
|
* There are probably more maintainable ways to do this. |
|
|
|
|
|
* However, as long as there are kind people paying close |
|
|
|
|
|
* attention to these subtler details, I shall sleep in peace. |
|
|
|
|
|
* |
|
|
|
|
|
* If you know a better way to keep them from diverging, send a PR. |
|
|
|
|
|
*/ |
|
|
*/ |
|
|
.sp-cm { |
|
|
.sandpack--playground .sp-cube-wrapper { |
|
|
-webkit-text-size-adjust: none !important; |
|
|
background-color: var(--sp-colors-surface1); |
|
|
padding: 0 !important; |
|
|
|
|
|
} |
|
|
|
|
|
.cm-wrap { |
|
|
|
|
|
background: transparent !important; |
|
|
|
|
|
} |
|
|
|
|
|
.sp-pre-placeholder { |
|
|
|
|
|
display: block !important; |
|
|
|
|
|
margin-top: 0px !important; |
|
|
|
|
|
margin-bottom: 0px !important; |
|
|
|
|
|
padding: 18px var(--sp-space-3) !important; |
|
|
|
|
|
@apply font-mono !important; |
|
|
|
|
|
font-size: 13.6px !important; |
|
|
|
|
|
line-height: 24px !important; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
.text-xl .sp-pre-placeholder { |
|
|
|
|
|
font-size: 16px !important; |
|
|
|
|
|
line-height: 24px !important; |
|
|
|
|
|
} |
|
|
|
|
|
.sp-cm .cm-scroller { |
|
|
|
|
|
overflow: auto !important; |
|
|
|
|
|
padding: 18px 0 !important; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.console .sp-cm, |
|
|
.sandpack--playground .sp-overlay { |
|
|
.console .sp-cm .cm-scroller, |
|
|
@apply bg-card; |
|
|
.console .sp-cm .cm-line { |
|
|
|
|
|
padding: 0px !important; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-cm .cm-gutters { |
|
|
html.dark .sandpack--playground .sp-overlay { |
|
|
background-color: var(--sp-colors-bg-default); |
|
|
@apply bg-wash-dark; |
|
|
z-index: 1; |
|
|
|
|
|
} |
|
|
|
|
|
.sp-wrapper { |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
} |
|
|
|
|
|
.sp-wrapper .sp-custom-layout { |
|
|
|
|
|
overflow: initial; |
|
|
|
|
|
border: 0px solid transparent; |
|
|
|
|
|
border-top-left-radius: 0px; |
|
|
|
|
|
border-top-right-radius: 0px; |
|
|
|
|
|
border-bottom-left-radius: 0.5rem; |
|
|
|
|
|
border-bottom-right-radius: 0.5rem; |
|
|
|
|
|
} |
|
|
|
|
|
.sp-wrapper .sp-layout-devtools { |
|
|
|
|
|
border-bottom-left-radius: 0; |
|
|
|
|
|
border-bottom-right-radius: 0; |
|
|
|
|
|
} |
|
|
|
|
|
html.dark .sp-layout > :not(:first-child) { |
|
|
|
|
|
border-color: #343a46; |
|
|
|
|
|
} |
|
|
|
|
|
html.dark .sp-layout { |
|
|
|
|
|
background-color: #343a46; |
|
|
|
|
|
} |
|
|
|
|
|
html .sp-loading { |
|
|
|
|
|
background-color: transparent; |
|
|
|
|
|
} |
|
|
|
|
|
html.dark .sp-loading { |
|
|
|
|
|
background-color: #23272f; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@media (min-width: 768px) { |
|
|
/** |
|
|
.sp-tabs .sp-tab-button { |
|
|
* CodeBlock |
|
|
margin: 0 12px 0 0; |
|
|
*/ |
|
|
} |
|
|
.sandpack--codeblock .cm-content { |
|
|
|
|
|
padding: 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* Devtools */ |
|
|
.sandpack--codeblock .cm-content.cm-readonly .cm-line { |
|
|
.sp-devtools { |
|
|
padding: 0 var(--sp-space-3); |
|
|
border-bottom-left-radius: 0.5rem; |
|
|
|
|
|
border-bottom-right-radius: 0.5rem; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
} |
|
|
} |
|
|
.sp-devtools > div { |
|
|
|
|
|
--color-background: var(--sp-colors-bg-default) !important; |
|
|
|
|
|
--color-background-inactive: var(--sp-colors-fg-inactive) !important; |
|
|
|
|
|
--color-background-selected: #087ea4 !important; |
|
|
|
|
|
--color-background-hover: transparent !important; |
|
|
|
|
|
--color-modal-background: #ffffffd2 !important; |
|
|
|
|
|
|
|
|
|
|
|
--color-tab-selected-border: #087ea4 !important; |
|
|
|
|
|
|
|
|
|
|
|
--color-component-name: var(--theme-definition) !important; |
|
|
/** |
|
|
--color-attribute-name: var(--theme-property) !important; |
|
|
* Placeholder |
|
|
--color-attribute-value: var(--theme-string) !important; |
|
|
*/ |
|
|
--color-attribute-editable-value: var(--theme-property) !important; |
|
|
.sandpack .sp-code-editor .sp-pre-placeholder { |
|
|
--color-attribute-name-not-editable: var(--sp-colors-fg-default) !important; |
|
|
@apply font-mono; |
|
|
--color-button-background-focus: var(--sp-colors-fg-inactive) !important; |
|
|
font-size: 13.6px; |
|
|
|
|
|
line-height: 24px; |
|
|
--color-button-active: #087ea4 !important; |
|
|
padding: 18px 0; |
|
|
--color-button-background: transparent !important; |
|
|
|
|
|
--color-button: var(--sp-colors-fg-default) !important; |
|
|
|
|
|
--color-button-hover: var(--sp-colors-fg-active) !important; |
|
|
|
|
|
|
|
|
|
|
|
--color-border: var(--sp-colors-fg-inactive) !important; |
|
|
|
|
|
--color-text: rgb(35, 39, 47) !important; |
|
|
|
|
|
} |
|
|
|
|
|
html.dark .sp-devtools > div { |
|
|
|
|
|
--color-text: var(--sp-colors-fg-default) !important; |
|
|
|
|
|
--color-modal-background: #16181de0 !important; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-devtools table td { |
|
|
.sandpack--codeblock .sp-code-editor .sp-pre-placeholder { |
|
|
border: 1px solid var(--sp-colors-fg-inactive); |
|
|
margin-left: var(--sp-space-3) !important; /* override inline style */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* Make focus rings work */ |
|
|
.sandpack--playground .sp-code-editor .sp-pre-placeholder { |
|
|
.sp-tab-button { |
|
|
margin-left: var(--sp-space-10) !important; /* override inline style */ |
|
|
transition: none !important; |
|
|
|
|
|
} |
|
|
|
|
|
.sp-tab-button:focus { |
|
|
|
|
|
outline: revert !important; |
|
|
|
|
|
} |
|
|
|
|
|
.sp-tab-button:focus-visible { |
|
|
|
|
|
box-shadow: none !important; |
|
|
|
|
|
} |
|
|
|
|
|
.sp-cm:focus-visible { |
|
|
|
|
|
box-shadow: inset 0 0 0 4px rgba(20, 158, 202, 0.4) !important; |
|
|
|
|
|
} |
|
|
|
|
|
.cm-line { |
|
|
|
|
|
padding: 0 var(--sp-space-3) !important; |
|
|
|
|
|
} |
|
|
|
|
|
.cm-lineNumbers { |
|
|
|
|
|
padding-left: var(--sp-space-1) !important; |
|
|
|
|
|
padding-right: var(--sp-space-1) !important; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* For iOS: prevent browser zoom when clicking on sandbox. */ |
|
|
.text-xl .sp-pre-placeholder { |
|
|
@media screen and (max-width: 768px) { |
|
|
font-size: 16px !important; |
|
|
@supports (-webkit-overflow-scrolling: touch) { |
|
|
line-height: 24px !important; |
|
|
.cm-content { |
|
|
|
|
|
font-size: initial; |
|
|
|
|
|
} |
|
|
|
|
|
.DocSearch-Input { |
|
|
|
|
|
font-size: initial; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-cm { |
|
|
/** |
|
|
padding-left: 8px !important; |
|
|
* Expand button |
|
|
} |
|
|
*/ |
|
|
|
|
|
|
|
|
.sp-layout { |
|
|
.sp-layout { |
|
|
min-height: 216px; |
|
|
min-height: 216px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-layout > .sp-stack:nth-child(1) { |
|
|
.sp-layout > .sp-stack:nth-child(1) { |
|
|
/* Force vertical if there isn't enough space. */ |
|
|
/* Force vertical if there isn't enough space. */ |
|
|
min-width: 431px; |
|
|
min-width: 431px; |
|
@ -285,6 +261,7 @@ html.dark .sp-devtools > div { |
|
|
/* Max height is needed to avoid too long files. */ |
|
|
/* Max height is needed to avoid too long files. */ |
|
|
max-height: 40vh; |
|
|
max-height: 40vh; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-layout > .sp-stack:nth-child(2) { |
|
|
.sp-layout > .sp-stack:nth-child(2) { |
|
|
/* Force vertical if there isn't enough space. */ |
|
|
/* Force vertical if there isn't enough space. */ |
|
|
min-width: 431px; |
|
|
min-width: 431px; |
|
@ -298,11 +275,13 @@ html.dark .sp-devtools > div { |
|
|
max-height: unset; |
|
|
max-height: unset; |
|
|
height: auto; |
|
|
height: auto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.sp-layout.sp-layout-expanded > .sp-stack:nth-child(2) { |
|
|
.sp-layout.sp-layout-expanded > .sp-stack:nth-child(2) { |
|
|
/* Clicking "show more" lets mobile preview go full height. */ |
|
|
/* Clicking "show more" lets mobile preview go full height. */ |
|
|
max-height: unset; |
|
|
max-height: unset; |
|
|
height: auto; |
|
|
height: auto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@media (min-width: 1280px) { |
|
|
@media (min-width: 1280px) { |
|
|
.sp-layout > .sp-stack:nth-child(1) { |
|
|
.sp-layout > .sp-stack:nth-child(1) { |
|
|
/* On desktop, clamp height by pixels instead. */ |
|
|
/* On desktop, clamp height by pixels instead. */ |
|
@ -324,8 +303,106 @@ html.dark .sp-devtools > div { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sandpack--playground .sp-layout .sandpack-expand { |
|
|
|
|
|
border-left: none; |
|
|
|
|
|
margin-left: 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.expandable-callout .sp-stack:nth-child(2) { |
|
|
.expandable-callout .sp-stack:nth-child(2) { |
|
|
min-width: 431px; |
|
|
min-width: 431px; |
|
|
min-height: 40vh; |
|
|
min-height: 40vh; |
|
|
max-height: 40vh; |
|
|
max-height: 40vh; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Integrations: console |
|
|
|
|
|
*/ |
|
|
|
|
|
.console .sp-cm, |
|
|
|
|
|
.console .sp-cm .cm-scroller, |
|
|
|
|
|
.console .sp-cm .cm-line { |
|
|
|
|
|
padding: 0px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Integrations: eslint |
|
|
|
|
|
*/ |
|
|
|
|
|
.sp-code-editor .cm-diagnostic { |
|
|
|
|
|
@apply text-secondary; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Integrations: React devtools inline |
|
|
|
|
|
*/ |
|
|
|
|
|
.sp-devtools { |
|
|
|
|
|
border-bottom-left-radius: 0.5rem; |
|
|
|
|
|
border-bottom-right-radius: 0.5rem; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sp-wrapper .sp-layout-devtools { |
|
|
|
|
|
border-bottom-left-radius: 0; |
|
|
|
|
|
border-bottom-right-radius: 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Overwrite inline sty |
|
|
|
|
|
*/ |
|
|
|
|
|
.sp-devtools > div { |
|
|
|
|
|
--color-background: var(--sp-colors-surface1) !important; |
|
|
|
|
|
--color-background-inactive: var(--sp-colors-surface2) !important; |
|
|
|
|
|
--color-background-selected: var(--sp-colors-accent) !important; |
|
|
|
|
|
--color-background-hover: transparent !important; |
|
|
|
|
|
--color-modal-background: #ffffffd2 !important; |
|
|
|
|
|
|
|
|
|
|
|
--color-tab-selected-border: #087ea4 !important; |
|
|
|
|
|
|
|
|
|
|
|
--color-component-name: var(--sp-syntax-color-definition) !important; |
|
|
|
|
|
--color-attribute-name: var(--sp-syntax-color-property) !important; |
|
|
|
|
|
--color-attribute-value: var(--sp-syntax-color-string) !important; |
|
|
|
|
|
--color-attribute-editable-value: var(--sp-syntax-color-property) !important; |
|
|
|
|
|
--color-attribute-name-not-editable: var(--sp-colors-clickable) !important; |
|
|
|
|
|
--color-button-background-focus: var(--sp-colors-surface2) !important; |
|
|
|
|
|
|
|
|
|
|
|
--color-button-active: var(--sp-colors-accent) !important; |
|
|
|
|
|
--color-button-background: transparent !important; |
|
|
|
|
|
--color-button: var(--sp-colors-clickable) !important; |
|
|
|
|
|
--color-button-hover: var(--sp-colors-disabled) !important; |
|
|
|
|
|
|
|
|
|
|
|
--color-border: var(--sp-colors-surface2) !important; |
|
|
|
|
|
--color-text: rgb(35, 39, 47) !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
html.dark .sp-devtools > div { |
|
|
|
|
|
--color-text: var(--sp-colors-clickable) !important; |
|
|
|
|
|
--color-modal-background: #16181de0 !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sp-devtools table td { |
|
|
|
|
|
border: 1px solid var(--sp-colors-surface2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Hard fixes |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* The text-size-adjust CSS property controls the text inflation |
|
|
|
|
|
* algorithm used on some smartphones and tablets |
|
|
|
|
|
*/ |
|
|
|
|
|
.sandpack .sp-cm { |
|
|
|
|
|
-webkit-text-size-adjust: none; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* For iOS: prevent browser zoom when clicking on sandbox |
|
|
|
|
|
*/ |
|
|
|
|
|
@media screen and (max-width: 768px) { |
|
|
|
|
|
@supports (-webkit-overflow-scrolling: touch) { |
|
|
|
|
|
.cm-content { |
|
|
|
|
|
font-size: initial; |
|
|
|
|
|
} |
|
|
|
|
|
.DocSearch-Input { |
|
|
|
|
|
font-size: initial; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|