Skip to content

Commit

Permalink
feat(client): custom typography theme
Browse files Browse the repository at this point in the history
  • Loading branch information
waylaidwanderer committed Mar 4, 2023
1 parent d5defe0 commit 70ebff0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ if (!process.server) {
</div>
<!-- message text -->
<div
class="prose prose-sm prose-invert prose-blockquote:border-l-white/50 break-words max-w-6xl"
class="prose prose-sm prose-chatgpt break-words max-w-6xl"
v-html="(message.role === 'user' || message.raw) ? parseMarkdown(message.text) : parseMarkdown(message.text, true)"
/>
</div>
Expand Down
26 changes: 26 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,30 @@ module.exports = {
plugins: [
require('@tailwindcss/typography'),
],
theme: {
extend: {
typography: ({ theme }) => ({
chatgpt: {
css: {
'--tw-prose-body': theme('colors.slate[300]'),
'--tw-prose-headings': theme('colors.slate[100]'),
'--tw-prose-lead': theme('colors.slate[300]'),
'--tw-prose-links': theme('colors.slate[200]'),
'--tw-prose-bold': theme('colors.slate[100]'),
'--tw-prose-counters': theme('colors.slate[300] / 50%'),
'--tw-prose-bullets': theme('colors.slate[300] / 50%'),
'--tw-prose-hr': theme('colors.slate[300] / 50%'),
'--tw-prose-quotes': theme('colors.slate[100]'),
'--tw-prose-quote-borders': theme('colors.slate[300] / 50%'),
'--tw-prose-captions': theme('colors.slate[300] / 50%'),
'--tw-prose-code': theme('colors.white'),
'--tw-prose-pre-code': theme('colors.slate[300]'),
'--tw-prose-pre-bg': 'rgb(0 0 0 / 50%)',
'--tw-prose-th-borders': theme('colors.slate[300]'),
'--tw-prose-td-borders': theme('colors.slate[300] / 50%'),
},
},
}),
},
},
};

0 comments on commit 70ebff0

Please sign in to comment.