Design comparison
Solution retrospective
Hi! I would appreciate it if you could review my code and give feedback. Your feedback is very important to me, thank you very much!
Community feedback
- @KristinaRadosavljevicPosted about 2 years ago
Hi, Raymond! Very cool solution, it really looks great :)
I noticed two things that you might want to consider:
- I would add just a little bit of top and bottom padding on the
body
because the card sticks to the top/bottom edge of the screen if the viewport height is smaller than the height of the card. - A little disclaimer for this next one - I don't know all that much about Sass, I'm just starting to get into it myself - BUT I think there's a different way to define variables in Sass and it's much cleaner than the regular CSS way. You can define them as, for example,
$cyan: hsl(178, 100%, 50%);
and you don't have to do it inside the:root
selector. And then when you use them in the code, you don't have to use thevar()
function, but just the name preceded by the$
symbol, as inbackground-color: $cyan;
. Apparently, however, there's a difference in how CSS and Sass variables are compiled, so maybe read more on that (for example here) before you take my advice :D
Other than that, really great job! :)
Marked as helpful0@keyztrokeePosted about 2 years ago@KristinaRadosavljevic Thank you for your input, very much appreciated π
1@keyztrokeePosted about 2 years ago@KristinaRadosavljevic Hi thereπ, Can you please look at what I did if I understand your suggestion correctly? Your feedback is important to me. Kindly take a look if you have time. Thank you!
0@KristinaRadosavljevicPosted about 2 years ago@keyztrokee Yeah, now your Sass code looks much cleaner, I like that you've moved all the variables to a separate file, that's definitely a good practice to adopt when you move on to bigger projects :)
1@keyztrokeePosted about 2 years ago@KristinaRadosavljevic Thank you so much I learned something new π
1 - I would add just a little bit of top and bottom padding on the
- @vanzasetiaPosted about 2 years ago
Hi, Raymond Fajiculay! π
Congratulations on finishing this challenge! π
One suggestion I have is to keep the CSS specificity as low and flat as possible. There is no need to nest from the
html
element. I recommend using single-class selectors for styling whenever possible. Also, I recommend only nesting when you want to style pseudo-elements, pseudo-classes (:hover
,:focus
, etc), and@media
queries.This was a mistake that I made when I was first using Sass. When I wanted to improve the site, the Sass files were hard to understand because of deep nesting. As a result, I had to rewrite the entire styling.
Hope this helps!
Marked as helpful0@keyztrokeePosted about 2 years ago@vanzasetia Thank you for your input, very much appreciated π
1@keyztrokeePosted about 2 years ago@vanzasetia Hi thereπ, Can you please look at what I did if I understand your suggestion correctly? Your feedback is important to me. Kindly take a look if you have time. Thank you!
0@vanzasetiaPosted about 2 years ago@keyztrokee Great! Now, the stylesheet has low specificity. Also, the Sass code is much easier to understand. Good job! π
1@keyztrokeePosted about 2 years ago@vanzasetia Thank you so much I learned something new π
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