Skip to content

Collapse arrow acts weird when padding is removed #2914

Closed Answered by saadeghi
HOMA40K asked this question in Q&A
Discussion options

You must be logged in to vote

I added after:!top-4 class to your code:
https://play.tailwindcss.com/Nhfn77BFVS

<div tabindex="0" class="collapse collapse-arrow border border-base-300 bg-base-200 peer-checked:text-secondary-content">
  <input type="checkbox" class="peer min-h-0" />
  <div class="collapse-title min-h-0 p-0 text-xl font-medium after:!top-4">Focus me to see content</div>
  <div class="collapse-content peer-checked:text-secondary-content">
    <p>tabindex="0" attribute is necessary to make the div focusable</p>
  </div>
</div>

Replies: 2 comments 4 replies

Comment options

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

@Vijaykv5
Comment options

@HOMA40K
Comment options

Comment options

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

Answer selected by saadeghi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants