Open singingwolfboy opened 7 years ago
I don't disagree with the sentiment, but the way this is phrased this is an issue that can never be closed.
Do we have a lot of these? If its a manageable number, this issue should be to remove them all. If there are too many, we should break them off into bite-sized pieces.
Should this just be limited to the issue in https://github.com/mitodl/micromasters/pull/2693#discussion_r103716869 and the code it was copied from?
$ grep "\!important" static/scss/*.scss static/scss/public_style/*.css | wc -l
164
It's a lot -- more than I realized. Bite-sized pieces is probably a good idea.
It's possible to use
!important
on a CSS rule to override all other rules. This is bad practice, and should be avoided because it makes debugging CSS more difficult. (see MDN reference) It also makes it more difficult for user-specified styles to override website-specified styles, which can sometimes be important for accessibility purposes.We should avoid
!important
whenever possible in our CSS. When it is not possible to avoid!important
, we should add a comment justifying its use.