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

QR code component

LEONARDO ROCHA GOMES•10
@Baleke
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello guys whatever feedbacks is welcome here

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Lucas 👾•104,160
    @correlucas
    Posted over 2 years ago

    👾Oi @Baleke, tudo bem? Parabéns pelo desafio! Seja bem vindo a comunidade do Frontend Mentor

    Acabei de ver sua solução e tenho umas dicas pra melhorar seu código/design:

    1.Ao invés de usar <p> pro bloco contendo o título principal, ao invés use <h1>, porque cada página precisa de um h1 pro título principal e siga a sequência se você adicionar outro título como h1, h2 , h3…

    2.Use unidades relativas como rem ou em em vez de px para melhorar seu desempenho redimensionando fontes entre diferentes telas e dispositivos. Para fazer um site mais acessível, o ideal seria usar rem em vez de px. O REM não se aplica apenas ao tamanho da fonte, mas também a todos os tamanhos.

    3.O seu componente já está com o design pronto, um bom exercício para melhorar seu código, seria criar a estrutura mais limpa o possível e reduzir seu código ao máximo. Por exemplo, você pode segurar todo conteúdo em um bloco só usando (<main> ou <div>) nesse caso vamos usar <main> por que é uma tag semântica. Se você notar, nem precisa adicionar nenhum div além da principal para segurar o conteúdo (img, h1 e p). A estrutura ideal e mais limpa possível para esse desafio é essa aqui:

    <body>
    <main>
    <img src="./images/image-qr-code.png" alt="QR Code Frontend Mentor" >
     <h1>Improve your front-end skills by building projects</h1>
    <p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p>
    </main>
    </body>
    

    👋 Espero que essas dicas te ajudem e que você continue no foco!

    Marked as helpful
  • Melvin Aguilar 🧑🏻‍💻•61,020
    @MelvinAguilar
    Posted over 2 years ago

    Hi @Baleke 👋, good job for completing this challenge and welcome to the Frontend Mentor Community! 🎉

    In addition to the above comments here are some suggestions you might consider:

    • Don't name your class with camelCase use naming conventions to name it.
    • Use max-width: 280px to .card selector instead of width, this will make the card container a bit responsive on mobile, but no larger than 260px.
    • Use min-height: 100vh to body selector, with this property you set a height and you let the element grow even more if necessary.
    • Update the image to make it a bit responsive:
    .card img {
        max-width: 240px;
        width: 85%;
        border-radius: 10px;
    }
    

    I hope those tips will help you.

    Good Job and happy coding !

    Marked as helpful
  • LarryTheFatCat•50
    @LarryTheFatCat
    Posted over 2 years ago

    Hey!

    Nice work on the challenge!

    Small card! That's alright,

    Couple things:

    1.- Very small card, but that was very cool how you still made it look like the image! 2.- Fix the 1 accessibility issue, should be a very easy fix 3.- If you can, try to fix the <p> attribute text color, that should be changed and you can do that by doing

    color: {selected-color}

    Other then that, nice work!

    Marked as helpful
  • Kamasah-Dickson•5,570
    @Kamasah-Dickson
    Posted over 2 years ago
    1. Your solution looks great but not responsive. Use max-width for your card instead of just width .
    2. Don't use px for card widths, use rem to achieve responsiveness.
    3. To help with the accessibility issues wrap your card in a main semantic tag.
    4. Your footer must be text align center.
    5. Bonus Headings must be used in reducing order e.g h1,h2,h3,h4 do not mixed them up they should be used in descending order. I hope this was helpful😀

    Happy coding and have a nice day👍

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

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

Oops! 😬

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

Log in with GitHub