[whatwg] style='' on every element
Jon Barnett
jonbarnett at gmail.com
Fri May 4 07:33:53 PDT 2007
>
> > # # [19:40] <Hixie> hsivonen: so, my requirements for the <font>/
>
> style="" thing is that style="" not be allowed everywhere, since
> > that encourages media-specific markup.
A style attribute that includes media-specific properties (page-break-after,
voice-family) still works as expected. The only thing "style" doesn't
provide is to apply non-media-specific attributes in a media-specific way
(applying a border to screen media and not print media). That's a rare use
case.
Is this spec dead?
http://www.w3.org/TR/css-style-attr
Would/could that spec allow @media rules within the style attribute? It
apparently allows @include rules.
It's a 5 year old draft, but it looks useful. Yes, I understand its
functionality is covered by local <style> elements
Does HTMLElement still implement ElementCSSInlineStyle from DOM Style 2?
someelement.style is very popular in Javascript, and I don't see a
compelling reason to remove it if it is being removed.
It's worth nothing how browsers currently handle setting a property using
someelement.style:
someelement.style.border = "1px solid";
alert(someelement.parentNode.innerHTML);
IE, Firefox, and Opera all show the "border" property as part of the style
attribute (even if the style attribute wasn't already set). Firefox uses
the "border" property, IE uses "border-left", "border-right", etc. Opera
doesn't use any shortcut properties and uses "border-left-style", etc.
Konqueror does apply the border, but doesn't reflect that property in the
innerHTML. I'm not sure how important any of this is.
--
Jon Barnett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070504/71626623/attachment-0001.htm>
More information about the whatwg
mailing list