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

Article_Preview_Component_Master ( Javascript )

Thomas•550
@TomSif
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?

I continued to apply the same methodologies as on previous projects, mobile first, use of the BEM method which I think this time the class names are explicit, annotate my code to explain what is happening there and I first finished the mobile tablet and desktop design before adding the small javascript functions.

What challenges did you encounter, and how did you overcome them?

In the tablet version the pop-up menu was out of the box so I improvised an intermediate version with a menu to the left of the button and an arrow to the right. The most complicated thing I think was the small details, changing the color of the arrow in the button, I improvised a solution with css filters, but there might have been simpler options.

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

All advice is welcome whether in html, css or javascript, I would be curious to know the opinion of people with more advanced levels than mine on the way I organized my code, there are surely methodologies which I don't know yet, thank you in advance to those who will take the time to read my code, it's really a big help when you're self-taught

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • muiruri3000•400
    @muiruri3000
    Posted 10 months ago

    Hi, Good Job, Keep it up. ##CSS Reset. Just a small issue to note it is important to set all paddings and margins zero so that you can be able to have uniform spacing as you set them yourselves. border box also helps so that you do not have to manually subtract the values of borders and paddings. all this is done just by

    ,::before,::after{ margin:0; padding:0; box-sizing: border-box; }

    Marked as helpful

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

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub