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

Carding with SCSS

ADNWeb 50

@AdityaDwiNugroho

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


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

I added box-shadow on it

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

centering a div, I finished it with all the existing center elements and used the top elements

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

improving my code and clean code to be better and remove unuseful code

Community feedback

@DylandeBruijn

Posted

Hi @AdityaDwiNugroho,

Good job on this component, it's pretty close to the design!

A couple tips:

  • Even though the box-shadow you used is nice, you could make the component look more like the design by getting the box-shadow from the Figma file.

  • You don't need all this code:

$breakpoint-tiny: 380px;
$breakpoint-small: 480px;
$breakpoint-medium: 768px;
$breakpoint-large: 1024px;

@mixin respond-to($breakpoint) {
    @if $breakpoint == tiny {
        @media (max-width: $breakpoint-tiny) { @content; }
    } @else if $breakpoint == small {
        @media (max-width: $breakpoint-small) { @content; }
    } @else if $breakpoint == medium {
        @media (max-width: $breakpoint-medium) { @content; }
    } @else if $breakpoint == large {
        @media (max-width: $breakpoint-large) { @content; }
    }
}

The component only needs to look good on two screen sizes.

  • You could try breaking up your SCSS in multiple SCSS files. Relevant documentation.

  • Try to not use absolute values too much like here:

width: 320px;
height: 497px;

If you set the width and height of the card in pixels like this and you would add more content to the card you would run into overflow issues. It's always good to leave either width or height as auto so the content can still flow.

Let me know if you would like more feedback or if you have any questions.

Marked as helpful

0

ADNWeb 50

@AdityaDwiNugroho

Posted

@DylandeBruijn Thanks a lot for your feedback and suggestions! 🙌. I'll make adjustments based on your suggestions 😊

1

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