article-preview-component-master using Javascript

Solution retrospective
I'm most proud of how I managed to implement a fully responsive layout that adapts smoothly between mobile and desktop views using a mobile-first approach. I also feel good about how clean and organized my CSS turned out, which made it easier to adjust styles as I iterated.
If I were to do this project again, I would focus more on accessibility from the start, such as ensuring the share button is fully keyboard-accessible and adding proper ARIA labels for screen readers. Additionally, I would consider using CSS Grid for the desktop layout to experiment with different layout techniques.
What challenges did you encounter, and how did you overcome them?One of the main challenges was toggling the visibility of the share bar in a way that worked well on both mobile and desktop. At first, my JavaScript logic was too simple and didn't account for different screen sizes, which caused some unexpected behavior. I overcame this by refactoring my code to use class toggling and by testing the component thoroughly at various breakpoints.
Another challenge was aligning the share icon and ensuring it looked consistent in both the info section and the share bar. I solved this by unifying the HTML structure for both icons and using flexbox for alignment, as well as adjusting the SVG sizing with CSS.
What specific areas of your project would you like help with?I would appreciate feedback on the following areas:
Accessibility: Are there improvements I can make to ensure the share functionality is accessible to all users, especially those using screen readers or navigating via keyboard?
JavaScript logic: Is there a more efficient or cleaner way to handle the toggling of the share bar between mobile and desktop?
CSS organization: Are there best practices I could follow to make my CSS even more maintainable as the project grows?
Any suggestions or code reviews in these areas would be really helpful
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Leyanis Díaz'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