0

I have a bit of a custom table within my app , I receive data about which borders are there on each td tag

my border info property for example is TBLR , which means I have borders on top , bottom , left and right and so on tailwind isn't really picking up on individual borders for me , an example tag would look like this :

 <td class=" border-t-2 border-t-red-900  border-b-2 border-b-red-900  border-l-2 border-l-red-900 " colspan="1" rowspan="1">Unit Supply temp in Econ mode</td>

but that doesn't add the border colors ,

Here's a sandbox with the example : https://codesandbox.io/s/tailwind-css-and-react-forked-dsy1em

Would love some help why these classes aren't working

Mohamed Nabil
  • 525
  • 2
  • 9
  • 24
  • Does this answer your question? [How to use template literals in tailwindcss to change classes dynamically?](https://stackoverflow.com/questions/68020378/how-to-use-template-literals-in-tailwindcss-to-change-classes-dynamically) – Konrad Dec 10 '22 at 11:05
  • You can't use template literals with tailwind like that – Konrad Dec 10 '22 at 11:06
  • @Konrad oh that makes sense , Any way I can work around it ? – Mohamed Nabil Dec 10 '22 at 12:46

0 Answers0