[csswg-drafts] ::details-content padding and border are visible when details element is not open (#12845)

Rolf-B has just created a new issue for https://github.com/w3c/csswg-drafts:

== ::details-content padding and border are visible when details element is not open ==
(css-pseudo-4)

If you add padding or border to ::details-content, they stay visible and use screen space even if the details-element is closed. If you also add a background-color, you get an empty area below the summary. I did not expect that and I am not sure if there are real use cases for this.

The behavior can be circumvented by adding the [open] attribute selector to the CSS rule, but IF it's intentional, please say so in the spec. And if it's undesired, say that, so that the browser vendors can adapt.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12845 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 23 September 2025 07:28:38 UTC