You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.6 KiB

  1. /** @type {import('tailwindcss').Config} */
  2. const defaultTheme = require("tailwindcss/defaultTheme");
  3. // Custom color with css variable color in __theme_color.scss
  4. function customColors(cssVar) {
  5. return ({ opacityVariable, opacityValue }) => {
  6. if (opacityValue !== undefined) {
  7. return `rgba(var(${cssVar}), ${opacityValue})`;
  8. }
  9. if (opacityVariable !== undefined) {
  10. return `rgba(var(${cssVar}), var(${opacityVariable}, 1))`;
  11. }
  12. return `rgb(var(${cssVar}))`;
  13. };
  14. }
  15. module.exports = {
  16. content: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"],
  17. darkMode: "class",
  18. theme: {
  19. container: {
  20. center: true,
  21. padding: {
  22. DEFAULT: "1rem",
  23. "2xl": "128px",
  24. },
  25. },
  26. // fontFamily: {
  27. // display: ["var(--font-display)", ...defaultTheme.fontFamily.sans],
  28. // body: ["var(--font-body)", ...defaultTheme.fontFamily.sans],
  29. // },
  30. extend: {
  31. colors: {
  32. primary: {
  33. 50: customColors("--c-primary-50"),
  34. 100: customColors("--c-primary-100"),
  35. 200: customColors("--c-primary-200"),
  36. 300: customColors("--c-primary-300"),
  37. 400: customColors("--c-primary-400"),
  38. 500: customColors("--c-primary-500"),
  39. 6000: customColors("--c-primary-600"),
  40. 700: customColors("--c-primary-700"),
  41. 800: customColors("--c-primary-800"),
  42. 900: customColors("--c-primary-900"),
  43. },
  44. secondary: {
  45. 50: customColors("--c-secondary-50"),
  46. 100: customColors("--c-secondary-100"),
  47. 200: customColors("--c-secondary-200"),
  48. 300: customColors("--c-secondary-300"),
  49. 400: customColors("--c-secondary-400"),
  50. 500: customColors("--c-secondary-500"),
  51. 6000: customColors("--c-secondary-600"),
  52. 700: customColors("--c-secondary-700"),
  53. 800: customColors("--c-secondary-800"),
  54. 900: customColors("--c-secondary-900"),
  55. },
  56. neutral: {
  57. 50: customColors("--c-neutral-50"),
  58. 100: customColors("--c-neutral-100"),
  59. 200: customColors("--c-neutral-200"),
  60. 300: customColors("--c-neutral-300"),
  61. 400: customColors("--c-neutral-400"),
  62. 500: customColors("--c-neutral-500"),
  63. 6000: customColors("--c-neutral-600"),
  64. 700: customColors("--c-neutral-700"),
  65. 800: customColors("--c-neutral-800"),
  66. 900: customColors("--c-neutral-900"),
  67. },
  68. },
  69. },
  70. },
  71. variants: {
  72. extend: {},
  73. },
  74. plugins: [
  75. require("@tailwindcss/typography"),
  76. require("@tailwindcss/forms"),
  77. require("@tailwindcss/aspect-ratio"),
  78. ],
  79. };