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

Responsive multi page site using BEM, Less, CSS grid and more

bem, less
Kevin Walker•140
@kwalker3000
A solution to the Designo multi-page website challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


  • General feedback is greatly appreciated!

  • This is my first time trying to use BEM naming convention. I like it, but I understand some people do not. If you are one of those people, what do you prefer?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Vanza Setia•27,715
    @vanzasetia
    Posted over 2 years ago

    Hi, Kevin!

    Every class naming convention has its pros and cons. Block Element Modifier (BEM) uses many classes and can make HTML looks messy.

    I use BEM and I find it works well for me. So, if you find BEM works well for you then don't worry about other people's opinions about it.

    Now, I have some suggestions to improve this solution. First, for the home page:

    • Remove the word "logo" from the alternative text of the logo. Alternative text should not contain any words that are related to "image".
    • For images containing text, make sure the alternative text includes the image's text. In this case, the Designo logo should have an alt value of “Designo”. Reference — Checklist - The A11Y Project #for-images-containing-text-make-sure-the-alt-description-includes-the-images-text
    • Setting visibility: hidden for visually hidden styling will remove the element from the accessibility tree. The hamburger menu does not have text content.
    • The page should only have one <nav> element for desktop and mobile navigation. Avoid creating duplicate HTML markups for different devices.
    • "web design", "app design", and "graphic design" are not headings. The same goes for the "view projects". Those are links with heading styling.
    • Having <h2> and <h3> as the children element of <a> is potentially invalid HTML. So, change those headings to <span>. Caninclude - Child <h2> and Parent <a>
    • All illustrations are decorative images. So, leave the alternative text empty (alt="").
    • For your information, decorative images are images that don't add any information and serve only aesthetic purposes.
    • If the logo is wrapped by an anchor tag, include the link destination on the alternative text (alt="Designo - Home").

    After writing those suggestions, I notice there are two HTML files for the home page, one index.html on the root of the repository and another one on the /pages/home/home.html. I am confused.

    Anyway, here are some more suggestions:

    • Avoid using JavaScript to add styling (unless you have no other option). JavaScript allows you to change the CSS code using the style property. But, to make debugging easier and improve code maintainability, it’s best to avoid it. Use CSS classes instead.
    • Provide the non-minified CSS, so people can give feedback about the styling of the website.

    I hope you find this useful. Happy holidays!

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