W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] Ability to style <details>/<summary> to be open (e.g. for print styles)

From: Xidorn Quan via GitHub <sysbot+gh@w3.org>
Date: Thu, 07 Dec 2017 15:45:54 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-350006666-1512661554-sysbot+gh@w3.org>
I'm thinking about whether it is possible to describe the behavior of `<details>`/`<summary>` in CSS rather than having them being HTML rendering magic.

The most straightforward approach might be defining a new pseudo-element (something like `::details-content`) for wrapping content in `<details>` other than the effective `<summary>`. But generally, browser vendors would be against adding this kind of pseudo-element wrapper, because they can bring lots of unnecessary complexity.

Maybe we can have that pseudo-element, but only allow `display` property with `none` or `contents`. This should make it easy to implement, I suppose.

-- 
GitHub Notification of comment by upsuper
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2084#issuecomment-350006666 using your GitHub account
Received on Thursday, 7 December 2017 15:45:56 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:44 UTC