tailwind.config.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. },
  54. green: {
  55. DEFAULT: '#36AF6A',
  56. highlight: '#38AD691A',
  57. },
  58. pink: '#EA4D84',
  59. 'dark-blue': '#045972',
  60. orange: '#F39804',
  61. },
  62. extend: {},
  63. },
  64. plugins: [
  65. lineClampPlugin,
  66. formKitTailwind,
  67. plugin(({ addVariant }) => {
  68. addVariant('formkit-populated', [
  69. '&[data-populated]',
  70. '[data-populated] &',
  71. '[data-populated]&',
  72. ])
  73. addVariant('formkit-required', [
  74. '&[data-required]',
  75. '[data-required] &',
  76. '[data-required]&',
  77. ])
  78. addVariant('formkit-is-checked', [
  79. '&[data-is-checked]',
  80. '[data-is-checked] &',
  81. '[data-is-checked]&',
  82. ])
  83. addVariant('formkit-variant-primary', [
  84. '[data-variant="primary"] &',
  85. '[data-variant="primary"]&',
  86. ])
  87. addVariant('formkit-variant-secondary', [
  88. '[data-variant="secondary"] &',
  89. '[data-variant="secondary"]&',
  90. ])
  91. }),
  92. ],
  93. }