3 ms·
The only situation I can justify using it for is to override inline styles that jQuery can leave behind in the DOM. Other than that, I haven't seen any legitima
by waylandsmithers 10y ago
The only situation I can justify using it for is to override inline styles that jQuery can leave behind in the DOM. Other than that, I haven't seen any legitimate cases for using it to get past the normal specificity rules.
- ratbeard 10y agoI use it for 'style classes' that you add to an element purely to get some styling change - for example '.pad-left' or '.text-center'. In this case you may be trying to override a style from a stronger selector like `.table td { text-align: left }`. With style classes you don't run in to the issue of needing to then override the !important rule w/ another important rule - you would just remove the style class.