Skip to content

Commit

Permalink
fix(docs): support dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Mar 10, 2022
1 parent 3e11dda commit cba01f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ watchEffect(async () => {
</BaseEmpty>
<div
v-else
class="htw-prose htw-p-4 htw-max-w-none"
class="htw-prose dark:htw-prose-invert htw-p-4 htw-max-w-none"
v-html="renderedDoc"
/>
</template>
8 changes: 8 additions & 0 deletions packages/histoire/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ module.exports.theme.extend.typography = (theme) => ({
},
},

'--tw-prose-invert-quote-borders': theme('colors.gray-800'),

blockquote: {
marginLeft: 0,
marginRight: 0,
Expand All @@ -105,8 +107,14 @@ module.exports.theme.extend.typography = (theme) => ({
'& p:last-child': {
marginBottom: 0,
},

'.dark &': {
backgroundColor: theme('colors.gray-750'),
},
},

'--tw-prose-invert-bullets': theme('colors.gray-500'),

li: {
marginTop: '0.1rem',
marginBottom: '0.1rem',
Expand Down

0 comments on commit cba01f1

Please sign in to comment.