Skip to content

Styling rounded img component with Tailwind? #126

Answered by srmagura
deadcoder0904 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @deadcoder0904, I think I have achieved the effect you are going for: https://codesandbox.io/s/react-loading-skeleton-with-rounded-image-forked-s5mq0?file=/src/App.tsx

Changes:

  1. Make Skeleton have height=100% to fill the entire circle.
  2. Set overflow: hidden on the skeleton container to prevent the skeleton from going outside the circle.
  3. Set line-height: 1 on the skeleton container so there is no blank space at the top of the circle.

Let me know if you have other questions.

Replies: 1 comment 1 reply

Comment options

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

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