Is it possible to remove the IE-specific behavior CSS property via a more specific rule or the !important
declaration? Example:
.a-rule { behavior: url(/some.htc); } .a-rule.more-specific { behavior: /*no HTC*/ }
I realize that overriding CSS properties is undesirable, but I'm stuck here.
On Edit: I'm not sure where people are getting confused about this question. For all purposes, you can consider this already being an IE specific stylesheet. I'm asking how, if .a-rule
above exists and is immutable, how can one remove the behavior via a more specific rule? A standard CSS equivalent would be:
.a-rule { border: 1px solid black; } .a-rule.more-specific { border: 0 none; }
One can reset the border property for a subset of elements via a more specific rule. I'm asking how to reset the behavior property in an analogous way.
Use the revert keyword to reset a property to the value established by the user-agent stylesheet (or by user styles, if any exist). Use the revert-layer keyword to reset a property to the value established in a previous cascade layer.
The all property in CSS resets all of the selected element's properties, except the direction and unicode-bidi properties that control text direction.
In short, there's no easy way to restore to default values to whatever a browser uses . The closest option is to use the 'initial' property value, which will restore it to the default CSS values, rather than the browser's default styles.
The default value is "none". See:
What is the *correct* way to unset the behavior property in CSS?
The solution:
.a-rule { behavior: url(/some.htc); } .a-rule.more-specific { behavior: none; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With