Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 8 months ago

QR Code Invitation Component Built with Semantic HTML5 and CSS Flexbox

accessibility, pure-css
P
Gillian Oliveira•260
@lia-oliveira
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?

It was very nice to center the card without using margin: 0 auto. Before starting a new project, I will look through all available resources before developing a solution, instead of relying only on the Figma files.

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

The biggest challenge for me was the card shadow. I tried CSS documentation and some tutorials to understand how it works, but it only looked right after ChatGPT helped me get the transparency value that matched the example card.

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

I've been researching accessibility, and I would really like to find materials created by people who use screen readers or have altered color perception. I’d also like to know how to test a page to ensure it meets accessibility requirements.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Wisdom•230
    @Unifies
    Posted 8 months ago

    Hey Gillian, you've done an amazing work on this challenge. Your solution looks excellent, your code structure superb, and your approach to the solution [researching additional helpful resources before embarking on the challenge] intelligent - overall, Kudos! You nailed it.

    A teeny update on the design - add some weight to the title's font, instead of normal font-weight, use instead font-weight: 700; to make the title bolder as is in the design.

    Some code optimization suggestions for your CSS:-

    For the challenges on here, it is probably not needed but using colors, font-weights, sizes etc. as variables would be a good practice. Like:

    :root {
        /* Colors */
        --White: hsl(0, 0%, 100%);
        --Slate-300: hsl(212, 45%, 89%);
        --Slate-500: hsl(216, 15%, 48%);
        --Slate-900: hsl(218, 44%, 22%);
        --attribution: hsl(228, 45%, 44%);
        /* Fonts */
        --fs-h1: 1rem;
        --fs-p: 0.85rem;
        --fw-400: 400;
        --fw-700: 700;
    }
    

    and then you can use them for styling like font-weight: var(--fw-700);.

    Reason being: These things may change in a real project, so when it does all you have to do is change them from the root instead of searching in the whole css file/s.

    Avoid using hard coded values, like width: 320px; use instead max-width: 320px; or even better; use equivalent rem/em values instead for better responsiveness on all screen sizes.

    For accessibility, add an alt text to the QR Code Image - Imgs need to have meaningful alt text, except for the decorative imgs - as it is greatly useful to users who rely on screen readers.

    That's all from me - PS: let a pal know if you find a good resource that explains accessibility's best practices, I'm also on the lookout for one.

    Wish you luck, Happy coding!

    Marked as helpful
  • Yassin Amr•170
    @justXeeZ
    Posted 8 months ago

    good job! keep going and upload more solutions!

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