Skip to content

Commit ab9d08a

Browse files
Override default prose code styles (#1186)
* Override default prose code styles * Add changeset * Update .changeset/funny-pillows-listen.md
1 parent 193c7df commit ab9d08a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.changeset/funny-pillows-listen.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@obosbbl/grunnmuren-tailwind": patch
3+
---
4+
5+
Add custom styling to `<code>` in prose content

packages/tailwind/tailwind-base.cjs

+14
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,20 @@ module.exports = (options = {}) => {
534534
strong: {
535535
fontWeight: theme('fontWeight.medium'),
536536
},
537+
code: {
538+
padding: `${theme('spacing[0.5]')} ${theme('spacing.2')}`,
539+
borderRadius: theme('borderRadius.DEFAULT'),
540+
borderWidth: theme('borderWidth.DEFAULT'),
541+
borderColor: theme('colors.gray.DEFAULT'),
542+
backgroundColor: theme('colors.gray.lightest'),
543+
whiteSpace: 'nowrap',
544+
},
545+
'code::before': {
546+
content: '""',
547+
},
548+
'code::after': {
549+
content: '""',
550+
},
537551
blockquote: {
538552
// Reset defaults:
539553
marginBottom: 'unset',

0 commit comments

Comments
 (0)