On Tue, Apr 6, 2010 at 8:32 AM, Tab Atkins Jr. <[email protected]> wrote: > On Tue, Apr 6, 2010 at 2:00 AM, Ian Hickson <[email protected]> wrote: >> Well you currently can do this by using the onbeforeprint and onafterprint >> hooks, though that's not exactly pretty. Hopefully it will also be >> possible with media-specific CSS, though that depends on how <details> >> ends up working in CSS. If this proves to not be enough, we'll have to add >> something to support it; however, I'd like to wait until this is more >> widely deployed (so we get more experience) before changing this. > > I believe the CSS for <details> can be nothing more than: > > details:not(open) > :not(summary) { > display: none; > }
This doesn't hide text nodes that are direct children of <details>. For example: <details> <summary>Summary goes here</summary> Details that should be hidden are here </details> / Jonas
