Skip to content

Arbitrary group #13484

Answered by alex-krasikau
usman26392 asked this question in Help
Apr 9, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Sure, here it is - https://play.tailwindcss.com/ufcBceLYrz

<ul>
  <li>
    <div class="group">
      <div class="bg-red-100 group-[:nth-of-type(3)_&]:bg-red-300">First child</div>
    </div>
  </li>
  <li>
    <div class="group">
      <div class="bg-red-100 group-[:nth-of-type(3)_&]:bg-red-300">Second child</div>
    </div>
  </li>
  <li>
    <div class="group">
      <div class="bg-red-100 group-[:nth-of-type(3)_&]:bg-red-300">Third child</div>
    </div>
  </li>
  <li>
    <div class="group">
      <div class="bg-red-100 group-[:nth-of-type(3)_&]:bg-red-300">Forth child</div>
    </div>
  </li>
</ul>

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@usman26392
Comment options

@alex-krasikau
Comment options

Answer selected by usman26392
@usman26392
Comment options

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