diff --git a/tailwind.config.ts b/tailwind.config.ts index ec1f9e2..3ab6024 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -27,7 +27,33 @@ const config: Config = { 'text-secondary': '#565f89', 'accent': '#7aa2f7', 'border': '#414868', - } + }, + typography: ({ theme }) => ({ + invert: { + css: { + '--tw-prose-pre-bg': theme('colors.background.secondary'), + code: { + backgroundColor: theme('colors.background.primary'), + color: theme('colors.text.primary'), + fontWeight: '400', + }, + 'code::before': { + content: '""', + }, + 'code::after': { + content: '""', + }, + 'pre code': { + backgroundColor: 'transparent', + color: 'inherit', + }, + pre: { + backgroundColor: theme('colors.background.secondary'), + color: theme('colors.text.primary'), + }, + }, + }, + }), } }, plugins: [ diff --git a/templates/docs.templ b/templates/docs.templ index 8964cae..2d4a912 100644 --- a/templates/docs.templ +++ b/templates/docs.templ @@ -24,7 +24,7 @@ templ DocsLayout(nav Navigation, doc Document, user User) { colors: { background: { primary: '#1a1b26', - secondary: '#24283b', + secondary: '#16161e', }, text: { primary: '#c0caf5', @@ -36,20 +36,7 @@ templ DocsLayout(nav Navigation, doc Document, user User) { }, } } - } - @@ -387,7 +374,7 @@ templ DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer A colors: { background: { primary: '#1a1b26', - secondary: '#24283b', + secondary: '#16161e', }, text: { primary: '#c0caf5', @@ -396,23 +383,7 @@ templ DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer A border: '#414868', accent: '#7aa2f7', }, - typography: ({ theme }) => ({ - invert: { - css: { - code: { - backgroundColor: theme('colors.background.primary'), - color: theme('colors.text.primary'), - }, - 'pre code': { - backgroundColor: 'transparent', - }, - pre: { - backgroundColor: '#14151f', - }, - }, - }, - }), - } + }, } }