tailwind.config.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* eslint-disable global-require */
  2. const colors = require('tailwindcss/colors');
  3. function withOpacityValue(variable) {
  4. return ({ opacityValue }) => {
  5. if (opacityValue === undefined) {
  6. return `rgb(var(${variable}))`;
  7. }
  8. return `rgb(var(${variable}) / ${opacityValue})`;
  9. };
  10. }
  11. module.exports = {
  12. content: ['./src/**/*.{js,jsx,ts,tsx,vue}'],
  13. darkMode: 'class', // or 'media' or 'class'
  14. theme: {
  15. extend: {
  16. colors: {
  17. primary: withOpacityValue('--color-primary'),
  18. secondary: withOpacityValue('--color-secondary'),
  19. accent: withOpacityValue('--color-accent'),
  20. gray: colors.zinc,
  21. orange: colors.orange,
  22. },
  23. fontFamily: {
  24. sans: ['Poppins', 'sans-serif'],
  25. mono: ['Source Code Pro', 'monospace'],
  26. },
  27. container: {
  28. center: true,
  29. padding: {
  30. DEFAULT: '1rem',
  31. sm: '2rem',
  32. },
  33. },
  34. },
  35. },
  36. variants: {
  37. extend: {},
  38. },
  39. plugins: [require('@tailwindcss/typography')],
  40. };