Design comparison
Solution retrospective
I make everything ok. Thanks to everyone who will find something to add. A And thank to everyone who will review it.
Community feedback
- @12KentosPosted over 2 years ago
Hey @hermannleboss,
Nice job on the project, looks great! I noticed in your scss file you selected some of your elements directly like so.
a{ text-decoration: none; color: white; &:hover{ color: #00FFF8; }
While this isn't a big deal for small projects like this, generally it's not a good idea as this would select every single a element you have and apply those styles. I would highly suggest using a class directly, or using a class and then using the element to select your elements, as this will help you avoid a lot of headache in the future on larger projects.
Keep up the great work!
Marked as helpful1@hermannlebossPosted over 2 years ago@12Kentos Hello, thanks for your advice. I moov colors specs into a css. Should use class for all style spec for elements ? Usually we have element that have some global style. Like paragraphe style. And then somme ones have a specify style. Did i need to use only class selector ?
0@12KentosPosted over 2 years ago@hermannleboss If you want it to affect every single element you can use the element itself, like in the example I gave. But rarely will every element have the exact same style on the same page. A lot of them will have similar styles, which is why it's nice to give them a class. For instance most buttons will have a similar width/height/border radius on a page for consistency. So if you give it a class of
.btn
for example, you can easily reuse this code for all of the buttons you want to look alike on the page.However if you wanted to make a new button, if you didn't use a class you would have to do a lot of style resets to get it looking the way you want. I hope that makes sense?
0
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