Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

article preview component

P
Alex 350

@Sharky83

Desktop design screenshot for the Article preview component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


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

liked being able to carry out the eventlistener on the share icon.

What specific areas of your project would you like help with?

struggling to get the JS to work with the social_container in the correct positions.

i am submitting a little early for general comments/advice...

but this will also allow me to look at other solutions, to learn from and resubmit!

Community feedback

@Lescano713

Posted

Your CSS code is well-structured, but there are a few areas where improvements can be made to enhance readability, maintainability, and efficiency:

  1. Avoid Repeated Styles:

There are multiple instances where you set the same styles for different selectors. For example, the border-radius properties are applied multiple times. Consider using a common class for these styles to avoid repetition.

  1. Group Related Styles:

Group similar styles together to improve readability. For example, the .author_container styles are scattered. It would be better to keep all .author_container related styles together.

  1. Consistent Naming Conventions:

Ensure that naming conventions are consistent. For instance, .author_container and .author_name follow a certain pattern, but .social_container and .share_svg use different patterns. Consistent naming helps with maintainability.

  1. Use Shorthand Properties:

Utilize shorthand properties where possible. For example, you can combine border-top-left-radius and border-top-right-radius into a single border-radius property if the values are the same.

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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