3 ms·
At least regarding tailwindcss, it checks your code to filter out unused css classes. So it is recommended to have full class names in the code instead of const
by sionisrecur 2y ago
At least regarding tailwindcss, it checks your code to filter out unused css classes. So it is recommended to have full class names in the code instead of constructing them by concatenating strings. So if you have a variable `buttonColor` that can be `red` or `blue` it is better to do something like
switch(buttonColor) {
'red': return 'button-red';
'blue': return 'button-blue';
}
over
return 'button-' + buttonColor;