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

Order Summary Component

jasnoludekā€¢ 70

@jasnoludek

Desktop design screenshot for the Order summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Thank you for viewing my attempt at this challenge. I struggled the most with alternating the mobile and desktop background patterns, and centering my component properly within them. I'm wondering how others have managed to solve this problem. I welcome your feedback.

Community feedback

@0xabdulkhaliq

Posted

Hello there šŸ‘‹. Congratulations on successfully completing the challenge! šŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

DECORATIVE SVG'S ā™Øļø:

  • The alt attribute is used to provide alternative text for images in HTML documents. The alt attribute is used by screen readers to describe the image to visually impaired users, which is essential for web accessibility.
  • Now, when it comes to decorative SVGs, they are used purely for aesthetic purposes and do not convey any important information or functionality to the user.
  • Since these images do not convey any important information or functionality, there is no need for an alt attribute.
  • So feel free to set the alt attribute as "" for decorative svg's, because alt="" will be skipped by screen readers they will consider the image as decoration

Example:

<img src="images/decorative.svg" alt="">

<img class="card__icon-music" src="images/icon-music.svg" alt="An icon of paired eighth notes">
šŸ‘‡
<img class="card__icon-music" src="images/icon-music.svg" alt="">

.

I hope you find this helpful šŸ˜„ Above all, the solution you submitted is great !

Happy coding!

1

jasnoludekā€¢ 70

@jasnoludek

Posted

Thank you @0xAbdulKhalid, that is very helpful information. I will be making this change. Happy coding to you as well!

0

@0xabdulkhaliq

Posted

@jasnoludek Glad you found it helpful ! šŸ¤ 

0
Joshā€¢ 100

@Joshua-Farr

Posted

Why did you include this piece of code in your solution?

@media (prefers-reduced-motion: reduce) {
html:focus-within {
scroll-behavior: auto;
}
  
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
1

jasnoludekā€¢ 70

@jasnoludek

Posted

Thanks for your question @Joshua-Farr. Having just learned about CSS resets I've been trying to implement them in my code. In my last challenge I used Josh Comeau's, and so for this one I used Andy Bell's. It seemed to me that this particular piece of code wouldn't affect any part of this project, since there is no animation, but I chose not to omit it as an exercise in accessibility. I appreciate any suggestions on what to use/not use, or rather, how to make such decisions when using resets. Or, if/when CSS resets are best used. Thanks again!

0

@0xabdulkhaliq

Posted

Hello @Joshua-Farr,

  • That piece of code is used to stop the animations on the page manually, the prefers reduced motion is an option which can available on every device to stop animations
  • If your device is low-end or you just wanna stop them for your personal preference then you can enable it
  • After you enable it then the condition in implied on browser so that the website can also detect the condition for stopping the animation
  • In short; it is used to stop or allow animations occuring on a website
  • Hope my thoughts helpful to you!
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