tailwind.config.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. // Copyright (C) 2012-2022 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. },
  50. red: {
  51. DEFAULT: '#E54011',
  52. highlight: '#E540111A',
  53. bright: '#FF4008',
  54. dark: '#261F1D',
  55. },
  56. green: {
  57. DEFAULT: '#36AF6A',
  58. highlight: '#38AD691A',
  59. },
  60. pink: '#EA4D84',
  61. 'dark-blue': '#045972',
  62. orange: '#F39804',
  63. },
  64. extend: {},
  65. },
  66. plugins: [
  67. lineClampPlugin,
  68. formKitTailwind,
  69. plugin(({ addVariant }) => {
  70. addVariant('formkit-populated', [
  71. '&[data-populated]',
  72. '[data-populated] &',
  73. '[data-populated]&',
  74. ])
  75. addVariant('formkit-required', [
  76. '&[data-required]',
  77. '[data-required] &',
  78. '[data-required]&',
  79. ])
  80. addVariant('formkit-is-checked', [
  81. '&[data-is-checked]',
  82. '[data-is-checked] &',
  83. '[data-is-checked]&',
  84. ])
  85. addVariant('formkit-label-hidden', [
  86. '&[data-label-hidden]',
  87. '[data-label-hidden] &',
  88. '[data-label-hidden]&',
  89. ])
  90. addVariant('formkit-variant-primary', [
  91. '[data-variant="primary"] &',
  92. '[data-variant="primary"]&',
  93. ])
  94. addVariant('formkit-variant-secondary', [
  95. '[data-variant="secondary"] &',
  96. '[data-variant="secondary"]&',
  97. ])
  98. }),
  99. ],
  100. }