-
Notifications
You must be signed in to change notification settings - Fork 306
Closed
Description
I've changed the default code style to the common approach of making it an inline-block
and adding space around it. But inside lists I get this result:
This is the code to reproduce.
typography: {
default: {
css: {
'h1 > a, h2 > a, h3 > a, h4 > a': {
textDecoration: 'none',
},
code: {
backgroundColor: defaultTheme.colors.gray[200],
borderRadius: defaultTheme.borderRadius.default,
paddingLeft: defaultTheme.spacing[1],
paddingRight: defaultTheme.spacing[1],
display: 'inline-block',
lineHeight: defaultTheme.lineHeight['snug'],
},
'code::before': {
content: 'none',
},
'code::after': {
content: 'none',
},
'pre code::before': {
content: 'none',
},
'pre code::after': {
content: 'none',
},
},
},
}
*Note that the last two rules are related to a bug in Firefox, fixed in #41
I think this is the cause https://github.com/tailwindlabs/tailwindcss-typography/blob/master/src/styles.js#L259
'> ul > li > *:first-child': {
marginTop: em(20, 16),
},
'> ul > li > *:last-child': {
marginBottom: em(20, 16),
},
'> ol > li > *:first-child': {
marginTop: em(20, 16),
},
'> ol > li > *:last-child': {
marginBottom: em(20, 16),
},
Metadata
Metadata
Assignees
Labels
No labels