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.

86 lines
2.7 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. 'bronze': '#D09460',
  33. 'bronze-secondary': '#F9F0E9',
  34. primary: {
  35. 50: customColors("--c-primary-50"),
  36. 100: customColors("--c-primary-100"),
  37. 200: customColors("--c-primary-200"),
  38. 300: customColors("--c-primary-300"),
  39. 400: customColors("--c-primary-400"),
  40. 500: customColors("--c-primary-500"),
  41. 6000: customColors("--c-primary-600"),
  42. 700: customColors("--c-primary-700"),
  43. 800: customColors("--c-primary-800"),
  44. 900: customColors("--c-primary-900"),
  45. },
  46. secondary: {
  47. 50: customColors("--c-secondary-50"),
  48. 100: customColors("--c-secondary-100"),
  49. 200: customColors("--c-secondary-200"),
  50. 300: customColors("--c-secondary-300"),
  51. 400: customColors("--c-secondary-400"),
  52. 500: customColors("--c-secondary-500"),
  53. 6000: customColors("--c-secondary-600"),
  54. 700: customColors("--c-secondary-700"),
  55. 800: customColors("--c-secondary-800"),
  56. 900: customColors("--c-secondary-900"),
  57. },
  58. neutral: {
  59. 50: customColors("--c-neutral-50"),
  60. 100: customColors("--c-neutral-100"),
  61. 200: customColors("--c-neutral-200"),
  62. 300: customColors("--c-neutral-300"),
  63. 400: customColors("--c-neutral-400"),
  64. 500: customColors("--c-neutral-500"),
  65. 6000: customColors("--c-neutral-600"),
  66. 700: customColors("--c-neutral-700"),
  67. 800: customColors("--c-neutral-800"),
  68. 900: customColors("--c-neutral-900"),
  69. },
  70. },
  71. },
  72. },
  73. variants: {
  74. extend: {},
  75. },
  76. plugins: [
  77. require("@tailwindcss/typography"),
  78. require("@tailwindcss/forms"),
  79. require("@tailwindcss/aspect-ratio"),
  80. ],
  81. };