tailwind.config.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. const colors = require('tailwindcss/colors')
  3. const lineClampPlugin = require('@tailwindcss/line-clamp')
  4. const formKitTailwind = require('@formkit/themes/tailwindcss')
  5. const plugin = require('tailwindcss/plugin')
  6. const path = require('path')
  7. // Add the moment we can use one tailwind config for the mobile app, but later we need to check
  8. // how this works with different apps.
  9. module.exports = {
  10. content: [`${path.resolve(__dirname)}/app/frontend/**/*.{js,jsx,ts,tsx,vue}`],
  11. theme: {
  12. fontFamily: {
  13. sans: [
  14. '"Fira Sans"',
  15. '"Helvetica Neue"',
  16. 'Helvetica',
  17. 'Arial',
  18. 'sans-serif',
  19. ],
  20. },
  21. colors: {
  22. transparent: 'transparent',
  23. current: 'currentColor',
  24. black: {
  25. DEFAULT: '#191919',
  26. full: colors.black,
  27. },
  28. white: colors.white,
  29. gray: {
  30. DEFAULT: '#999999',
  31. 100: '#D1D1D1',
  32. 150: '#D8D8D8',
  33. 200: '#656567',
  34. 300: '#4C4C4D',
  35. 400: '#323234',
  36. 500: '#282829',
  37. 600: '#262627',
  38. highlight: '#99999926',
  39. light: '#25262D99',
  40. },
  41. blue: {
  42. DEFAULT: '#23A2CD',
  43. dark: '#045972',
  44. highlight: '#23A2CD4D',
  45. },
  46. yellow: {
  47. DEFAULT: '#FFCE33',
  48. highlight: '#FFCE331A',
  49. inactive: '#A38629',
  50. },
  51. red: {
  52. DEFAULT: '#E54011',
  53. highlight: '#E540111A',
  54. bright: '#FF4008',
  55. dark: '#261F1D',
  56. },
  57. green: {
  58. DEFAULT: '#36AF6A',
  59. highlight: '#38AD691A',
  60. },
  61. pink: '#EA4D84',
  62. 'dark-blue': '#045972',
  63. orange: '#F39804',
  64. },
  65. extend: {},
  66. },
  67. plugins: [
  68. lineClampPlugin,
  69. formKitTailwind,
  70. plugin(({ addVariant }) => {
  71. addVariant('formkit-populated', [
  72. '&[data-populated]',
  73. '[data-populated] &',
  74. '[data-populated]&',
  75. ])
  76. addVariant('formkit-required', [
  77. '&[data-required]',
  78. '[data-required] &',
  79. '[data-required]&',
  80. ])
  81. addVariant('formkit-dirty', [
  82. '&[data-dirty]',
  83. '[data-dirty] &',
  84. '[data-dirty]&',
  85. ])
  86. addVariant('formkit-is-checked', [
  87. '&[data-is-checked]',
  88. '[data-is-checked] &',
  89. '[data-is-checked]&',
  90. ])
  91. addVariant('formkit-label-hidden', [
  92. '&[data-label-hidden]',
  93. '[data-label-hidden] &',
  94. '[data-label-hidden]&',
  95. ])
  96. addVariant('formkit-variant-primary', [
  97. '[data-variant="primary"] &',
  98. '[data-variant="primary"]&',
  99. ])
  100. addVariant('formkit-variant-secondary', [
  101. '[data-variant="secondary"] &',
  102. '[data-variant="secondary"]&',
  103. ])
  104. }),
  105. ],
  106. }