4 ms·
I disagree, I have found !important to be the only reliable way to make a print stylesheet override dynamic styles (width, positioning, etc.) applied by a JS UI
by eschutte2 16y ago
I disagree, I have found !important to be the only reliable way to make a print stylesheet override dynamic styles (width, positioning, etc.) applied by a JS UI framework (e.g. ExtJS/Sencha).
If someone has a better solution for that please tell me!
- kj12345 16y agoOne option is if you wrap the ExtJS content in a div with an id of "xyz", then find the rule you want to override e.g. in Firebug, you can make a rule in your custom stylesheet that has the same selector as the ExtJS one but prepended with "#xyz ", and your rule will always be more selective and therefore take precedence over the ExtJs rule.
- adamesque 16y agoThis only works if there's an existing style rule to override. The parent post is talking about overriding styles added inline to elements by JS libraries. An inline style will always override a rule in a stylesheet… unless the rule uses !important.