Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

QR Code Component - First Frontendmentor Project

accessibility, lighthouse
SaruMakes•160
@SaruMakes
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am proud of my attention towards accessibility. It's a topic that is dear to me, and I'd ideally like to make my websites as accessible as possible, while still being able to provide beautiful designs. As such, I try to learn and pay as much attention to this aspect as I can. This was a good way to put some of the things I'd learned into practice.

I'm proud of the fact that I could tell things were off, when I was using only the provided .jpg files in the beginning, and generally going entirely by eye. I couldn't tell exactly what or how to fix things to have them look identical, however. So that is something I'd like to get better at.

I was given a challenge by my brother (who's an experienced web developer) to use SVGs for the QR code and to have it be two images on top of each other. After a lot of trial and error, plus hours of troubleshooting, I was finally able to understand the possibilities, limitations and methods of positioning for a scenario like that. I'm proud that I stuck with it and kept refining, even after I'd already considered the project to be done.

What challenges did you encounter, and how did you overcome them?

I really struggled to figure out if there was indeed a box-shadow or not. I thought there was, but I couldn't replicate the effect at first. Eventually I decided to play around with the figma files, and I found out that there actually was a box-shadow like I'd thought, but that it was also using the alpha value, to make it almost invisible. Once I applied this knowledge, I got the shadow effect spot-on.

I was also struggling greatly with the positioning of the QR code element itself, when trying to center it inside the blue background. After continuing my training on Codecademy, I learned more about positioning and was able to apply some of that knowledge to help fix the issues. I was still struggling with fully centering the QR element, until I thought to check the figma file, take the measurements from there and apply a "top" and "left" offset in the stylesheet, to center it within the container.

What specific areas of your project would you like help with?

I would like to know if my code is generally structured well or not, and if I've made the page to a decent level of accessibility.

Also, while I used all the information I could glean from the figma files, I'm curious if that is how web developers generally use figma design files. Do you take as much information as you can from the design files and then translate that into your code, or how do you usually work with design files like that?

Is there anything in my code that I should have done differently, to either make it easier on myself or to make the code better/more easily readable?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Rishi Raijung•310
    @riishi101
    Posted about 1 year ago

    Incredible keep up the good work.

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