Details/summary polyfill: Set closed details visibility to hidden to make text nodes invisible (although still take up space)

Fixes #6166
Okay, I've added the comment.