css all:clear


There was some recent news about a new all:default; css property being introduced, which you could use as a css reset. One of it's usages is to prevent inherited styles for a widget.

I actually like this property. I also hope they introduce another value for it: clear (oh, you can bikeshed about the color, I don't care). This would effectively strip the element of any property (except, perhaps, user styles, although you could add an extra value to not clear those). The display property would be set to inline (because block seems like a promotion from inline to me). This includes styles applied to "widget" elements like input, select, and textarea.

.foo {
all: inherit | default | clear | user;

Reasoning? If you want to markup your html semantically, you'll still have to deal with the built-in styles that are automatically applied to certain elements. Sometimes you don't want this, even though you'd still want to use the elements properly (from the semantic pov, anyways). This would currently force you to apply css resets to at least those elements specifically. And then still you can only hope you "caught them all"...

Wishful thinking? Again? Ahw... One of these days... ;)

More info about this all:default; doohicky can be found in the css3 cascade spec.