theme('xml_icon') uses hardcoded DIVS, which is great. But what Drupal really needs is some method (and implemetations!) to allow xml icons in lists. i.e. each forum should list an icon.

This patch allows none-inline icons If Param inline is set to true, a span is returned as wrapper, otherwise the default div is returned.s

Comments

tangent’s picture

Why aren't all xml icons inline? There is no reason I can think of. Can't we just change them to span to eliminate the need for another argument?

Bèr Kessels’s picture

we could.
But I beleive a block element should be a div and an inline should be span. Off course you can achieve this with CSS, but I would like to follow the semantics.
And a lot of XML icons are block elements. In fact: all of them areblock elements in drupal ATM. So changing that would be semantically incorrect.

tangent’s picture

Yes, they are ALL currently block elements because theme_xml_icon() marks them up that way. My argument is that there is no justification for using a block level tag (DIV) for an image. If it should be displayed as a block then it will be contained in a block by the calling code. If it should not then it will not be. I still see no reason that it should be marked up with DIV.

Bèr Kessels’s picture

StatusFileSize
new507 bytes

this one changes it into a span;, like tangent suggests.

Bèr Kessels’s picture

status must be patch

dries’s picture

Committed to HEAD.

Anonymous’s picture