Last active
June 21, 2021 09:55
-
-
Save albingroen/e276b1b4caa36b43ad44f3b80df022fb to your computer and use it in GitHub Desktop.
Tailwind CSS Typography | Github markdown theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"], | |
darkMode: "media", // or 'media' or 'class' | |
mode: "jit", | |
theme: { | |
extend: { | |
typography: (theme) => ({ | |
light: { | |
css: { | |
color: "#adbac7", | |
h1: { | |
color: theme("colors.gray.300"), | |
borderColor: "#373e47", | |
}, | |
h2: { | |
color: theme("colors.gray.300"), | |
borderColor: "#373e47", | |
}, | |
h3: { | |
color: theme("colors.gray.300"), | |
}, | |
h4: { | |
color: theme("colors.gray.300"), | |
}, | |
h5: { | |
color: theme("colors.gray.300"), | |
}, | |
a: { | |
color: "#539bf5", | |
}, | |
code: { | |
color: theme("colors.gray.300"), | |
backgroundColor: "#3c4149", | |
}, | |
pre: { | |
backgroundColor: "#2d333b", | |
}, | |
strong: { | |
color: theme("colors.gray.300"), | |
}, | |
blockquote: { | |
borderLeftColor: "#4f5864", | |
color: "#768390", | |
}, | |
}, | |
}, | |
DEFAULT: { | |
css: { | |
color: "#41464a", | |
h1: { | |
fontWeight: theme("fontWeight.semibold"), | |
borderBottom: `1px solid #ebedef`, | |
paddingBottom: theme("spacing.3"), | |
marginBottom: theme("spacing.0"), | |
}, | |
h2: { | |
fontWeight: theme("fontWeight.semibold"), | |
borderBottom: `1px solid #ebedef`, | |
paddingBottom: theme("spacing.2"), | |
marginBottom: theme("spacing.3"), | |
marginTop: theme("spacing.6"), | |
}, | |
p: { | |
marginBottom: theme("spacing.3"), | |
marginTop: theme("spacing.3"), | |
}, | |
strong: { | |
fontWeight: theme("fontWeight.semibold"), | |
}, | |
code: { | |
borderRadius: theme("borderRadius.default"), | |
fontWeight: theme("fontWeight.normal"), | |
background: theme("colors.gray.100"), | |
padding: theme("spacing.1"), | |
"&::before": { | |
display: "none", | |
}, | |
"&::after": { | |
display: "none", | |
}, | |
}, | |
a: { | |
color: "#0066d6", | |
textDecoration: "none", | |
"&:hover": { | |
textDecoration: "underline", | |
}, | |
}, | |
li: { | |
marginBottom: theme("spacing.1"), | |
marginTop: theme("spacing.1"), | |
}, | |
blockquote: { | |
fontWeight: theme("fontWeight.normal"), | |
borderLeftColor: "#e0e3e6", | |
fontStyle: "none", | |
color: "#6a737d", | |
}, | |
}, | |
}, | |
}), | |
}, | |
}, | |
variants: { | |
extend: {}, | |
}, | |
plugins: [require("@tailwindcss/typography")], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment