Re:CSS coding techniques
by russelluresti on Friday May 20, 2016 @01:51PM
(#11739949)
The best use of "!important" is for utility classes. For example, if you want to just have a single class that determines when something is hidden, it's a lot easier to have a ".hidden" class that has "display: none !important" on it that overrides any other display you may have set. Otherwise, you'd need to have a ".Module_hidden" class for every single module or component you have - which is dumb.
[ Parent
| on HN ]
There are no comments on this comment yet.