Single price grid component master ( Made using flexbox )
Design comparison
Solution retrospective
Hello π , I am finally done with this project this is one of my projects made with the use of flex-box πͺ.
Some of the things I learned were how to use Flex
better and how or where to use them. I mostly learned everything from this interesting blog https://fedmentor.dev/posts/padding-margin/ by Grace.
All suggestions on how I can improve my code or project pls do πββοΈ.
Community feedback
- @Ocece77Posted about 1 year ago
Hi ππΏ Your project is great, I noticed you followed the design on mobile, I don't know if it was intentional, in any case it's not bad πππΏ
There are a few corrections to optimize your code πΏ:
First
When you import fonts from google fonts you can put them all in one link, just select the font with the weight you want and in the top right tab "select families" and voilΓ β¨
take a look at this YouTube short that shows how to do it: https://youtube.com/shorts/VPHqcvYTy3A?si=QBKYU4yzmF25RBv2
Second thing : You can use variables for colors, animation, family .. and store them in
root:
Using variables in CSS with the :root selector allows you to store and reuse values throughout your stylesheet, leading to easier and more consistent styling across your entire website βοΈ
Here some cool ressources to help you π :
Third thing : You can use transition on your button so that when the user no longer hovers over it, it returns smoothly to its initial state. By applying a
transition:
property to the button's CSS, you can control how properties change over a certain duration when the user interacts with it π.For exemple in your
button:hover{}
you can add atransition : 0.3s ease
While you can technically add the transition property to the
:hover
state of the button, it's more common and efficient to apply it directly to the button's base class like this :.button{ padding: 15px 6rem; background-color: hsl(71, 73%, 54%); border: none; display: inline-flex; color: #fff; font-size: 150%; font-weight: 200; transition: 3s ease; } .button:hover{ border-radius: 2em; border: 2px solid white; color: black; background-color: transparent; }
I noticed that your transition is a little bit long , transition more than 1 seconds is often considered too long for a transition duration because it can lead to a sluggish or delayed user experience . In many cases, users expect interactions and animations to feel snappy and responsive π. A 3-second transition could potentially frustrate users by making the interaction feel slow and unresponsive π«¨.
Here some ressources about it π:
Keep practice and NEVER GIVE UP !
Here a video that can motivate you :
Marked as helpful0@KingSkyrosPosted about 1 year ago@Ocece77 Thank you for all the help π, and also the mobile view was intentional π±βπ» I just wanted to test my mobile progress.
1
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