W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] Styling <details>

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 5 Apr 2011 18:36:20 -0700
Message-ID: <BANLkTimDqVtN1kNws1nA1V7LL3rOVfFx3A@mail.gmail.com>
I like the idea of using display:list-item for the <summary>.  It has
some unfortunate weaknesses due to the way that display:list-item is
defined; in particular, you can't get an inline summary without losing
the disclosure marker, since there's no way to make an inline
list-item right now.  I expect this to be fixed on the CSS side in due
time, with the 'display' property split into some subproperties such
that ::marker generation is independent of the list item being inline
or block.

I also like the display:transparent idea for handling the wrapper
around the rest of the contents.  Swapping out bindings (the second
solution) feels hacky and bad.  Using a <details>-specific
pseudo-element (the third solution) doesn't actually solve the problem
- it's still a box surrounding the extra content, so it would suffer
from the same problem that was previous cited, where setting
display:table-cell on an element in the contents wouldn't work as
intended.  Its only good side is that you can style the pseudoelement
directly, which would make *some* use-cases salvageable.

~TJ
Received on Tuesday, 5 April 2011 18:36:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT