I am trying to use all: initial
to isolate the CSS for a special "widget" in the page. The problem is that Safari and IE10 and earlier don't support the all
property and IE doesn't support the initial
value.
Is there a way to emulate the same behaviour, using either CSS or JavaScript?
For example, I imagine it would be possible to create a CSS class which contains every property defined by the CSS spec and sets them to the initial value specified by the spec. Is there a CSS class out there which already does that?
If I google "CSS reset" I get a bunch of stylesheets intended specifically to normalise the differences between user-agent stylesheets, which is different from all: initial
.
The
initial
keyword value was introduced in 2011 in the Cascading and Inheritance Module -- it's supported in FF 19+, Chrome, Safari, Opera 15+ but is currently not supported in any version of IE.This has no synonym to this purpose. Your only solutions is to trust in normalizers or handmake all your properties and values depending on browser (very hard work)