Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 9 months ago

Article preview component

sass/scss
P
Carl•1,235
@CarlHumm
A solution to the Article preview component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

A fun challenge, open to any feedback/advice.

What challenges did you encounter, and how did you overcome them?
  • Thinking in pixels: At one point I couldn't understand why my layout shifted between two breakpoints, then I realised I had placed a condition 1rem less than the breakpoint, and not 1 pixel. :)

  • Spam clicking would break the pause animation and throw the visibility of modal out of sync. Implemented a delay and check and found out about race conditions and debounce techniques - more research needed.

  • When toggling the menu button to close the modal, I had initially expected the mouseover event to re-fire and pause the button idle animation, however this didn't happen. I learned about event propagation and focus behavior in the DOM and solved it by setting the focus back on the button after closing the modal.

  • Started off experimenting with a CubeCSS approach but found it hard to stick with it as time progressed. Much like how you quickly troubleshoot in the browser I found I was writing quick css answers to problems without first considering the larger context of my styling methodology.

A small challenge but one which has given me a few interesting topics to research further into.

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 Carl'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