Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

Interactive Comments Section

astro, react, tailwind-css, typescript
Ruben•550
@RubenSmn
A solution to the Interactive comments section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This was a awesome challenge. The first problem I faced was the line for the indented comments / replies. At first I did this by simply adding a extra div with a border on the left. That worked until I started getting the layout to work on the desktop version, I could not get spacing on the left of the line. I managed to solve this by switching the nested replies to a flex container where I have 1 div which has the line and another div which holds the replies themself.

Then the second problem appeared this was the vote button switching from the bottom to the side as well as the action buttons going to the top when trying to implement the layout for desktop from mobile. The comment layout was based on flexbox but I found that this was not suiting so I moved to a grid layout. I learned that you can add specific gaps for both rows and columns which came in really handy.

Any advice is welcome. (I am trying my best on using correct semantic HTML)

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Ruben's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License