tailwind.config.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. const theme = require("tailwindcss/defaultTheme");
  2. module.exports = {
  3. important: true,
  4. content: [
  5. "content/**/*.md",
  6. "layouts/**/*.html",
  7. "./themes/**/layouts/**/*.html",
  8. "./content/**/layouts/**/*.html",
  9. "./layouts/**/*.html",
  10. "./content/**/*.html",
  11. ],
  12. darkMode: "class", // 'media' or 'class'
  13. theme: {
  14. extend: {
  15. backgroundColor: (theme) => ({
  16. darkest: theme(`colors.stone.900`),
  17. darker: theme(`colors.stone.800`),
  18. dark: theme(`colors.stone.700`),
  19. }),
  20. typography: (theme) => ({
  21. DEFAULT: {
  22. css: {
  23. "code::before": false,
  24. "code::after": false,
  25. a: {
  26. color: theme(`colors.blue.600`),
  27. textDecoration: "none",
  28. "&:hover": {
  29. color: theme(`colors.blue.800`),
  30. textDecoration: "underline",
  31. },
  32. },
  33. pre: {
  34. backgroundColor: theme(`colors.stone.200`),
  35. color: theme(`colors.gray.700`),
  36. },
  37. code: { color: theme(`colors.gray.700`) },
  38. },
  39. },
  40. invert: {
  41. css: {
  42. color: theme(`colors.gray.200`),
  43. a: {
  44. color: theme(`colors.yellow.300`),
  45. "&:hover": { color: theme(`colors.yellow.500`) },
  46. },
  47. h1: { color: theme(`colors.gray.200`) },
  48. h2: { color: theme(`colors.gray.200`) },
  49. h3: { color: theme(`colors.gray.200`) },
  50. h4: { color: theme(`colors.gray.200`) },
  51. h5: { color: theme(`colors.gray.200`) },
  52. h6: { color: theme(`colors.gray.200`) },
  53. strong: { color: theme(`colors.gray.200`) },
  54. td: { color: theme(`colors.gray.200`) },
  55. blockquote: { color: theme(`colors.gray.200`) },
  56. pre: {
  57. backgroundColor: theme(`colors.stone.700`),
  58. },
  59. code: { color: theme(`colors.gray.200`) },
  60. },
  61. },
  62. }),
  63. },
  64. },
  65. variants: { typography: ["invert"], extend: {} },
  66. plugins: [require("@tailwindcss/typography")],
  67. };