Skip to content
Discussion options

You must be logged in to vote

Hey! You need to use those utilities directly on the element you are trying to affect, not the parent:

https://play.tailwindcss.com/mdE23PLBQI

<div>
  <div class="odd:bg-blue-500">Row</div>
  <div class="odd:bg-blue-500">Row</div>
  <div class="odd:bg-blue-500">Row</div>
  <div class="odd:bg-blue-500">Row</div>
  <div class="odd:bg-blue-500">Row</div>
  <div class="odd:bg-blue-500">Row</div>
</div>

They are designed to be used in loops.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@harinathpamu
Comment options

Answer selected by harinathpamu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants