While porting my theme, I ran into a problem: On node forms, the body field in fact consists of more items, which are rendered independently, denying any sensible theming of their context:
- Teaser splitter controls (button/checkbox)
- The actual textarea with label
- Input formats fieldset

Basically, these are in fact one item (textarea with attached controls around), but for theming the additional items (teaser splitter controls and input formats) are *outside* the only suitable <div> wrapper (i.e. the 'form-item' class). Previously on 5.x, I somehow managed to live with input formats shown as a separate fieldset, but the teaser splitter button is a bit different: It's closely tied to the textarea, but quite not so visually - being defined in HTML *before* title for body field, and *outside* it's parent <div>, it either appears in a gap above title (quite losing context), or breaks into / overlaps awkwardly with the theming of div.form-item wrapping the textarea with title. For a sensible look, I need the textarea, title, and also teaser splitter controls to be enclosed in some HTML element in common, which I think is not just my theme specific demand; I believe this is needed for every single theme with other look than just plain white page. Currently, we lack such a wrapper element.

So, simple patch attached :)

Also attaching screenshots before/after - note that the button outside block is unsolvable without the proposed HTML change. I believe this problem is likely to affect anyone theming that form, so overrides should not be required as only possible solution here IMO.

Additionally, this patch also fixes http://drupal.org/node/179575 - the relative position of the button to textarea changing on the neighboring fieldset un/collapse, thus making nice theming nearly impossible margin/padding-wise. That issue is against default 6.x-dev/Garland behavior.

CommentFileSizeAuthor
nofix.jpg4.96 KBJirkaRybka
fixed.jpg4.26 KBJirkaRybka
body-wrapper.patch563 bytesJirkaRybka

Comments

jody lynn’s picture

Status: Needs review » Reviewed & tested by the community

Patch works for me.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

OK, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.