Hello Mongoid,
Those are great questions. And with all things coding, I’d say it depends on the circumstances. For a great article to read about the balance, check this one out that did a good job explaining. Smashing Magazine !important Article Link
In short the answer is that in general it’s to be avoided where possible. Since it’s such a powerful declaration, it can make things harder for ‘end users’ of templates to make changes easily and predictably.
So far a theme maker, to use them could make life a nightmare when an end-user tries to modify a theme.
How about for the end-user or the person attempting to customize it without reselling it for others to develop? Ideally, it would be great to follow the inheritance rules and avoid it where possible. Thankfully WordPress not only follows these rules, but also has a css file heirarchy that also does. So a child theme css stylesheet will override (in most cases) the parent or main theme css. So will css placed in most custom css plugin editors. Child themes are nice in that you can easily track what changes you make as an end-user if something goes awry after you add custom css.
However, sometimes there could be inheritance issues with how a theme was setup, various browser display issues – mobile’s included, etc. Also, some saas based systems, cms’s and custom websites might not have child theme capability easily built in. In such cases, making lots of changes to 4 or 5 different stylesheets where anyone could get overwritten with upgrades could become a nightmare to redo, fix, troubleshoot, etc. And again, this does not necessarily apply to wordpress. But it can be typical of other types of systems you might later encounter in your design career. !important statements can help you in such cases to separate final customization in a way you can track and ‘rinse-and-repeat’ on any similar theming system later. In the case of recommendations i make, it can be hard for some beginners to know where to put things, and I don’t know whether they’ve done child themes, etc. So I’ll usually give them the code with !important in it so that the change takes effect. Often on here i’ve been reading how a person seems to actually have the right code, but it isn’t working-which means it’s either in the wrong place or something else. FOr those persons understanding css like yourself better, if you can do it without the !important in a way you can track your changes, avoid get overwritten on theme updates, and respect inheritance issues then that would be preferrable. But in a lot of cases you are the end-user, usually !important in a child theme isn’t going to cause you much confusion or issues anyways since they’re all in one place and you know where they are ??
Danny ??