Design comparison
Solution retrospective
Do you know any CSS tips? Feedbacks are appreciated.
Community feedback
- @Enmanuel-Otero-MontanoPosted over 2 years ago
Hello Miguel! Congratulations for your solution.
Using important is considered bad practice and your code can become difficult to maintain using important. A tip to help you not to use important.
Try to use only "classes" to give styles. Leave the "id" for the JavaScript, this for the specificity issue. In this way, most of the time you will always have the same specificity in the elements and only when you want to overwrite a style of a certain element, you apply cascading styles. I know it's a bit tedious to achieve this 100%, but try to do it for most of the elements and in any case you get by with the labels and the classes ( div.sub-container ) for example.
Documentation on cascade and inheritance
I hope I've helped.
Cheers!
Marked as helpful1@sprakamatisPosted over 2 years ago@Enmanuel-Otero-Montano I'm taking note of this. Thank you!
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