Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 4 years ago

HTML, CSS, BEM

Gwenaël Magnenat•1,540
@gmagnenat
A solution to the Profile card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello everyone, This is my first challenge. If you have time to review my code, i'd like comments on the structure and the BEM methodology I try to implement. Thanks a lot for your feedbacks.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Adler G Luders•1,580
    @just-a-devguy
    Posted over 4 years ago

    Ok I'm going to be extremely picky here, so brace yourself. I think you did well implementing BEM; HOWEVER 😂, I would suggest instead of doing something like card__lineOne, two, etc..., do something like card__title and card__subtitle. I said that simply because I feel like that's more flexible. Had this not have just 2 lines, you'd have to do like card__lineFive, etc. Again EXTREME PICKINESS, not saying you did a bad job or trying to bash you. 😎

  • Matt Studdert•13,611
    @mattstuddert
    Posted over 4 years ago

    Hey Gwenaël, nice work on this challenge and congrats on submitting your first solution! 🎊

    Your solution looks great and matches up to the design really well. As you can see from the design comparison, there are only small areas where it differs slightly, which is great. I'd definitely recommend spending the time to try refining a little bit more. Attention to detail is a key characteristic of being a front-end dev. However, you definitely don't need to try making every project absolutely pixel-perfect. Pixel-perfection is often not an attainable goal in modern web development and can lead to spending too much time on a project when getting 90-95% of the way there will do.

    The main piece of feedback I'd have is to add in headings to create a proper content hierarchy. At the moment, you have no headings. Given this design, I'd say the person's name is the main heading (h1). The Followers, Likes, Photos content would be the other headings in this design and make sense as h2 headings. Because they're below the numbers in the design, you could flip the order in the HTML, so that screen reader software reads the headings first and then use flex-direction: column-reverse; to flip the order to match the design.

    Let me know if you have any questions. This is a great first submission! 👍

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
Frontend Mentor logo

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

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

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

Log in with GitHub