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

Qr code component using BEM, SCSS and Semantic HTML

@tiago-jv0

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Lucas 👾 104,420

@correlucas

Posted

👾Fala Tiago , tudo bem? Parabéns pelo desafio!

O seu componente já está com o design pronto, um bom exercício pra 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 semantica. Se você notar, nem precisa adicionar nenhum div além da principal pra segurar o conteúdo (img, h1 e p). A estrutura ideal e mais limpa possível pra esse desafio é essa aqui:

<body>
<main>
 <img src="./images/image-qr-code.png" alt="Qr Code Image" >
<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>

Pra reduzir o CSS, você pode excluir todas as classes e selecionar todos elementos no CSS com o seletor direto para cada um deles, nesse caso (img, div, main, h1 e p).

👋 Espero ter ajudado e continue no foco!

Marked as helpful

0

@tiago-jv0

Posted

@correlucas Obrigado pelo feedback, Lucas!

Eu preferi seguir uma abordagem mais verbosa pois estou tentando por em prática o meu conhecimento em metologias de nomeação em css, atualmente estou utlizando o BEM por ser o que uso no dia-a-dia, assim como também melhorar o meu uso de tags semanticas no html, mesmo assim, agradeço o seu comentário e como sempre, seu feedback é de grande valia para mim!!

1
Adriano 34,090

@AdrianoEscarabote

Posted

Hello @tiago-jv0, how are you?

You did a great job in this challenge, you really hit the pixel perfect, but I have a tip to make your code cleaner.

I noticed that you classes on elements, since there is only one element of the same type in the document, there is no need to put a class on the element. You could have done it like this:

main img h1 p

It would be cleaner code.

The rest is great! Hope it helps... 👍

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