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

Stats preview card HTML+CSS

Alexβ€’ 1,310

@AlexKolykhalov

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Any comments are welcome!

I had problems with the soft purple filter on the image:

  • am I doing the right thing?
  • how can it be improved?

Community feedback

@VCarames

Posted

Hey there! πŸ‘‹ Here are some suggestions to help improve your code:

  • The β€œimage” in this component are purely decorative. ⚠️ Their alt tag should be left blank and have an aria-hidden=β€œtrue” to hide them from assistive technology.

More Info: πŸ“š

[MDN Aria-Hidden] (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden#description)

  • This challenges requires the use of two images πŸŽ‘ at different breakpoints. ⚠️ The picture element will facilitate this.

Here is an example of how it works: EXAMPLE

Syntax:

  <picture>
    <source media="(min-width: )" srcset="">
    <img src="" alt="">
  </picture>

More Info: πŸ“š

https://www.w3schools.com/html/html_images_picture.asp

  • The statistics at the bottom are a list ⚠️, so it should be built using an unordered List element.

More Info: πŸ“š

MDN <ul>: The Unordered List element

  • For improved accessibility πŸ“ˆ for your content, it is best practice to use em for media-queries. Using this unit gives users the ability to scale elements up and down, relative to a set value.

If you have any questions or need further clarification, feel free to reach out to me.

Happy Coding! πŸŽ†πŸŽŠπŸͺ…

Marked as helpful

1

Alexβ€’ 1,310

@AlexKolykhalov

Posted

@vcarames wow, this is very good advices and remarks!! Thank you, i will be redo my work.

1
Alexβ€’ 1,310

@AlexKolykhalov

Posted

@vcarames how to know if picture is purely decorative or not? Did not quite understand about em for media-queries. @media screen and (min-width:600px) in this part?

1

@VCarames

Posted

@AlexKolykhalov

Glad I could help! 😁

when determining when an image is decorative or not, you have determine if it adds value to you components. For example, in this challenge. If you were to delete the image, the text would still make sense on its own.

Now take this challenge https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa, the image is not decorative because it adds value; it’s the image of the product.

Marked as helpful

1
Alexβ€’ 1,310

@AlexKolykhalov

Posted

@vcarames ok, I understood, thank you again!

0
Alexβ€’ 1,310

@AlexKolykhalov

Posted

@vcarames understood, just I read all sorts of articles like this one and decided to use rem to simplify. But I'll take your remark into account. Thank you again!

0
Alexβ€’ 1,310

@AlexKolykhalov

Posted

@vcarames thanks a lot!! This is what i need!

1
Hassia Issahβ€’ 50,810

@Hassiai

Posted

For the color of the image, give .card-image a background-color of soft-violet and add mix-blend-mode: multiply and opacity:0.8 to the img. there is no need to give .card_image display: grid and grid-template-areas.

.card_image{
background-color: hsl();
}
img{
mix-blend-mode: multiply;
opacity: 0.8;
}

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

1

Alexβ€’ 1,310

@AlexKolykhalov

Posted

@Hassiai thank you. I'll try!! ah, what about browser compatibility for mix-blend-mode?

0
Hassia Issahβ€’ 50,810

@Hassiai

Posted

@AlexKolykhalov it has browser compatibility issue , you can try and see if it works, it is not working, I will suggest, you use background-blend-mode: multiply and the image should be a background-image.

Hope am helpful.

Marked as helpful

0
Alexβ€’ 1,310

@AlexKolykhalov

Posted

@Hassiai thank you!

0
Alexβ€’ 1,310

@AlexKolykhalov

Posted

made corrections according to this comments

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