Generating TailwindCSS JS-based safelist with function?
14:26 25 Mar 2022

I'm attempting to generate a safelist for TailwindCSS 3.0.23 using a function so I can cover some ranges.

For some reason, the classes still seem to be purged.

module.exports = {
  content: ['./app/**/*.php', './resources/**/*.{php,vue,js}'],
  safelist: function() {
    let list = [
      'user-administrator:not(.wp-admin)',
    ];

    for(let i = 0; i <= 100; i += 5 ){
      list[list.length] = 'opacity-' + i;
    }

    return list;
  },
}

Is this type of thing possible?

tailwind-css tailwind-css-3