From 575b1b507bde767df86ce924d5988fef05dd1dd3 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Wed, 23 Nov 2022 12:50:44 -0500 Subject: [PATCH] update theme styles --- src/constants.ts | 3 +++ src/theme/foundations/textStyles.ts | 4 ++-- src/theme/index.ts | 9 ++++++--- src/utils/getProgrammingLanguageName.ts | 3 ++- src/utils/index.ts | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 src/utils/index.ts diff --git a/src/constants.ts b/src/constants.ts index 61fecffb85..ad39c7506f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -102,3 +102,6 @@ export const WINDOWS_BINARY_BASE_URL = export const LATEST_SOURCES_BASE_URL = 'https://github.com/ethereum/go-ethereum/archive/'; export const RELEASE_NOTES_BASE_URL = 'https://github.com/ethereum/go-ethereum/releases/tag/'; + +// Code snippet class constants +export const CLASSNAME_PREFIX = 'language-'; diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index a80270f338..f6fdc64775 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -135,14 +135,14 @@ export const textStyles = { fontSize: 'sm' }, 'inline-code-snippet': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 400, fontSize: 'md', lineHeight: 4, letterSpacing: '1%' }, 'code-block': { - fontFamily: '"JetBrains Mono", monospace', + fontFamily: 'heading', fontWeight: 400, fontSize: 'md', lineHeight: '21.12px', diff --git a/src/theme/index.ts b/src/theme/index.ts index a81404ae18..c1aa7e2a71 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -18,6 +18,9 @@ const overrides = { body: { bg: 'bg', transition: 'all 200ms linear !important' + }, + code: { + fontFamily: 'code !important' } }) }, @@ -29,9 +32,9 @@ const overrides = { 'button-bg': { _light: 'green.50', _dark: 'green.900' }, body: { _light: 'gray.800', _dark: 'yellow.50' }, 'code-bg': { _light: 'gray.200', _dark: 'gray.700' }, - 'code-bg-contrast': { _light: 'gray.800', _dark: 'gray.900' }, - 'code-text': { _light: 'green.50', _dark: 'green.50' }, - bg: { _light: 'yellow.50', _dark: 'gray.800' }, + 'terminal-bg': { _light: 'gray.800', _dark: 'gray.900' }, + 'terminal-text': { _light: 'green.50', _dark: 'green.200' }, + bg: { _light: 'yellow.50', _dark: 'gray.800' } } } }; diff --git a/src/utils/getProgrammingLanguageName.ts b/src/utils/getProgrammingLanguageName.ts index 2224fc2d7a..035667271c 100644 --- a/src/utils/getProgrammingLanguageName.ts +++ b/src/utils/getProgrammingLanguageName.ts @@ -1,4 +1,5 @@ -const CLASSNAME_PREFIX = 'language-'; +import { CLASSNAME_PREFIX } from '../constants'; + const DEFAULT = 'bash'; const TERMINAL = 'terminal'; const JS = ['javascript', 'js', 'jsx', 'ts', 'tsx']; diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000000..e3d2a70842 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1 @@ +export * from './getProgrammingLanguageName';