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

first projact (css html)

Akaraphon TipsaThean•40
@SuBTHai
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    MELT•170
    @MeltedGreenVelvet
    Posted over 3 years ago

    I think your solution is looking great, and congratulations on your first challenge! I hope you enjoyed it, and you continue to put out other completed challenges as well!!

    I have a few suggestions:

    1. Vertical alignment is a pain. On my display, your component is not vertically aligned. In this case, utilizing flexbox would be the easiest option. Not to mention, if you get comfortable using flexbox, you'll have more flexibility with other forms of alignment in future projects as well.

    2. If you were to check #D3D3D3 (light gray) against #FFF (white), you'll find that the color contrast is at a 1.50, which is calculated as "very poor" in terms of web accessibility. This means that the font color is hard to read, especially for folks that have disabilities. There are color contrast checker web apps that are great for this. The standard is at least a 4.5:1 ratio. This is more of a web design thing, but important if you decide to change the color of the given design's font. I installed a Chrome extension called Slick Color Picker that lets me color pick straight from the webpage. It's helpful in situations where I don't know the exact color of something. It gives you the exact hex code you need for your code. (It's also great if you enjoy digital art and graphic design!!)

    3. I see that you have a mix of inline and external CSS, plus an empty internal style tag. Using solely external CSS is best practice. It improves website performance and efficiency. On a more human level, external CSS is viewed as more organized. If you were to have a large website with many webpages and lots of styling, inline CSS would quickly get confusing, especially for those on your team who didn't create the original code.

    4. The universal selector is VERY handy. I can definitely understand why you'd pick that one to define your default styling. But, it's also hefty. It can slow the rendering of your webpages, so it's best to use it sparingly. It interrupts CSS inheritance, and you may have to write more CSS to account for that. A body selector, instead of a universal selector, would be great to define default styling.

    I hope my suggestions are helpful and make sense! Let me know if not!!

    Marked as helpful

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

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