Design comparison
Solution retrospective
I'm most proud of the button sliding in on hover.
What challenges did you encounter, and how did you overcome them?The button sliding in. Worked it somehow by using two layered buttons, with one's width being 0 and grow to 100% on hover.
Community feedback
- @StroudyPosted 3 months ago
Hey, I can't give many pointers as I haven't used those technology, But some things I noticed,
- Setting a height and width attribute to your
<img>
will increase performance to reduce layout shifts and improve CLS, It reserves the space on the page for the image, - Page is blocked from indexing, Search engines are unable to include your pages in search results if they don't have permission to crawl them
x-robots-tag: noindex
.
I look forward to seeing more from you and I hope to use svelte soon!
Marked as helpful1@ARiYaNSEp0-0Posted 3 months ago@Stroudy hi. good comment and good problem you mentioned but I am not sure if setting aspect ratio would fix that. the solution (which is recommended by many performance test tools) is using width and height attribute. with these attribute image have fix size even when not loaded then when image and css are loaded we don't have shifts anymore
Marked as helpful2@StroudyPosted 3 months ago@ARiYaNSEp0-0 Hey, I just did a deeper dive and you are correct, setting an aspect ratio for an image in CSS will ensure that the image maintains a specific height and width ratio, but it does not inherently provide the image with a specific height or width. Thank you for bringing that to my attention! :D Updated my comment, let me know if there is anything else I misunderstood I highly appreciate it!
1@ARiYaNSEp0-0Posted 3 months ago@Stroudy your welcome my friend. I am glad that it was helpful for you
1 - Setting a height and width attribute to your
Please log in to post a comment
Log in with GitHubJoin 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