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 with hover effects

@Alice-in-Matrix

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi!

I used css variables for colors and font, but I would separate them to another css file.

For example: global.css file, that contain only css variables in root selector.

Is there best practicies for this?

Community feedback

darryncodes 6,430

@darryncodes

Posted

Hi Aksinya,

Really nice work on this one, good solution.

I think your approach to CSS is completely fine on this size project. When your projects grow you could consider BEM to make building modular styles easier coupled with SASS to create multiple css files (partials) that relate to each component and compile to one style sheet.

Also you should embed some best practices resolving your accessibility report. Your .container <div> could be a <main> tag and your .card-title <p> could be a <h1>. Semantic html is really important.

I hope that helps!

Marked as helpful

0

@Alice-in-Matrix

Posted

@darryncodes, thanks for your advice!

I will definitely consider practising BEM with SASS in later projects.

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