diff --git a/beta/colors.js b/beta/colors.js index 1c3e26f11ba..bac74d41e9d 100644 --- a/beta/colors.js +++ b/beta/colors.js @@ -23,6 +23,7 @@ module.exports = { 'secondary-button-dark': '#404756', // gray-70 // Gray + 'gray-95': '#16181D', 'gray-90': '#23272F', 'gray-80': '#343A46', 'gray-70': '#404756', diff --git a/beta/src/components/MDX/CodeBlock/CodeBlock.module.css b/beta/src/components/MDX/CodeBlock/CodeBlock.module.css index 6f27668f9ba..176c53e507e 100644 --- a/beta/src/components/MDX/CodeBlock/CodeBlock.module.css +++ b/beta/src/components/MDX/CodeBlock/CodeBlock.module.css @@ -3,5 +3,5 @@ */ .codeViewer { - padding: 1.5rem 0.5rem; + padding: 6px 0.5rem !important; } diff --git a/beta/src/components/MDX/CodeBlock/CodeBlock.tsx b/beta/src/components/MDX/CodeBlock/CodeBlock.tsx index 55d5e069901..a84680dd9ac 100644 --- a/beta/src/components/MDX/CodeBlock/CodeBlock.tsx +++ b/beta/src/components/MDX/CodeBlock/CodeBlock.tsx @@ -11,8 +11,7 @@ import { SandpackThemeProvider, } from '@codesandbox/sandpack-react'; import rangeParser from 'parse-numeric-range'; - -import {CodeBlockLightTheme} from '../Sandpack/Themes'; +import {CustomTheme} from '../Sandpack/Themes'; import styles from './CodeBlock.module.css'; interface InlineHiglight { @@ -47,7 +46,7 @@ const CodeBlock = React.forwardRef( const linesToHighlight = getHighlightLines(metastring); const highlightedLineConfig = linesToHighlight.map((line) => { return { - className: 'bg-github-highlight', + className: 'bg-github-highlight dark:bg-opacity-10', line, }; }); @@ -81,7 +80,7 @@ const CodeBlock = React.forwardRef(
- +
- +
:not(:first-child) { - border-color: #343A46; +html.dark .sp-layout > :not(:first-child) { + border-color: #343a46; } html.dark .sp-layout { - background-color: #343A46; + background-color: #343a46; } html.dark .sp-loading { - background-color: #23272F; + background-color: #23272f; } @media (min-width: 768px) {