Files
ubicloud/tailwind.config.js
Jeremy Evans 6dcde8aa9b Add views/components/state_label.erb, make views/components/*_state_label.erb call it
This eliminates redundant code in the 3 views, creating frozen hashes to
store the colors for each type.

Update the tailwind config to read the helpers/web.rb file, to ensure
tailwind will pick up the css classes used in the hash constants.

After changes (rebased on main since last commit, so totals have changed):

Line Coverage: 99.59% (11687 / 11735)
Branch Coverage: 97.59% (3075 / 3151)
2025-01-14 09:04:22 -08:00

22 lines
399 B
JavaScript

/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./views/**/*.erb",
"./assets/**/*.js",
"./helpers/web.rb",
],
theme: {
extend: {},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
],
safelist: [
...[...Array(101).keys()].flatMap(i => `w-[${i}%]`),
{
pattern: /bg-[a-z]+-500/,
}
]
}