Re:CSS coding techniques
by spdustin on Friday May 20, 2016 @10:28AM
(#11738036)
All the people piling on with "!important is evil, nuke it from orbit!" have clearly never been tasked with branding an enterprise product like SharePoint.
[ Parent
| on HN ]
SharePoint and !important together is like a nuclear standoff of perfect evil in balance.
Truer words were never spoken. Have you discovered the elusive double-!important? Or the fabled inline style with !important?
SharePoint's markup is rad. /s
Hitting the nail on the head.
!important isn't intended as a workaround for your own code. It's for an external asset to override an internal one.
It's so bad in SharePoint. I try to avoid !important as much as possible, but it's really hard. Maybe it'll get better with the release of the SP Framework. Who knows?
I...I'll reserve judgment. The SharePoint Framework (awful name) will either become an amazing thing, or will be another example of "we didn't get this right (CSR, content search web parts, FrontPage/SPD itself, Design Manager, etc., etc.), so screw it, you guys do it. We give up."
But I'm okay with it either way. We'll still have to help people figure out where master pages / page layouts still fit in, and we will (hopefully) have an easier-to-reason-about path to use React or whatever other framework with SP in a supported way.