Closed huckfinnaafb closed 13 years ago
So, you think it should be an error instead?
If it's coded in as a warning currently, it's not working for me or a few other users I've talked to. I get no feedback from valid CSS with !important declarations, either errors or warnings.
At the moment its not throwing at us anything, no error and no warning. I would go with error for this one, !important 90% of the time means specificity issue is happening which can be fixed in some other way.
This is not an error by default, it's valid, but may lead to specificity war when overused. This should be a warning and may cause an error when the file contains an certain number of !important declarations.
Less then 5 - warning, more then 5 - error?
I've set it to 10, (OOCSS has 8 of them, so I figure out 10 would be realistic) see this pull request
Nice work. The pull request has been merged.
!important can quickly become an abused tool if not properly designing your CSS, and while certainly useful for leaf nodes or user-stylesheets, it should be noted that overuse can quickly create unneeded complexity with regards to specificity.