DEV Community

Discussion on: CSS Specificity and the use of !important: a case study

Collapse
 
munamohamed94 profile image
Muna Mohamed • Edited

Hi Malgosia, I'm glad you enjoyed the post! Thank you so much for sharing your experience, it really puts it into perspective the repercussions of using !important as a fix, particularly on legacy codebases where resolving the problems that arise with the overuse of !important can be tedious and very time-consuming.

I'm sorry to hear that you have the difficult task of correcting the mistakes of your predecessors and wish you the best of luck.

That is a perfect GIF to describe the impact that abusing !important can have on codebases! With regards to the best ways of passing knowledge and good practices to your team, I came across a really good post by

joefuzz image
, who had a similar struggle and the DEV community shared their experiences and gave some great tips and advice on solutions for this very problem. I really recommend giving it a read!

Thank you for the heads up! I've fixed the error so it's linked to the correct resource :)

Collapse
 
malgosiastp profile image
Malgosia

Awesome thank you :)

I think it's not only my struggle, there is a lot of projects like this :D

For me actually, it's not only about fixing it but what's more important for me - introduce good practices and teach my team members about the importance of avoiding !important :D and of course so they are convinced about this not only do it because someone asks :)

Really appreciate the article :) For sure will help me :)

Keep up spreading good CSS practices :)