Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save design-innovations/1c46558178704febc5cd0d8fbf1200a4 to your computer and use it in GitHub Desktop.
Save design-innovations/1c46558178704febc5cd0d8fbf1200a4 to your computer and use it in GitHub Desktop.
Tailwind - Set Typography Plugin Defaults
// Note: This uses custom colors so it will scream at you if you use as-is
extend: {
typography: (theme) => ({
DEFAULT: {
css: {
color: theme('colors.gray.800'),
a: {
color: theme('colors.peach.900'),
'&:hover': {
color: theme('colors.peach.700'),
},
},
h1: {
color: theme('colors.sunset.700'),
fontFamily: `${theme('fontFamily.serif')}`,
},
h2: {
color: theme('colors.peach.900'),
fontFamily: `${theme('fontFamily.serif')}`,
marginTop: '1rem',
},
h3: {
color: theme('colors.brand.800'),
fontFamily: `${theme('fontFamily.serif')}`,
},
h4: {
color: theme('colors.brand.800'),
},
ul: {
'&>li:before': {
// Color for bullets
backgroundColor: theme('colors.peach.500'),
},
},
},
},
}),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment