Follow

HTML tips: if you need to hide some content with a summary(*), you probably don't need a button and JavaScript to handle it. Wrapping it insides details/summary elements would suffice.

developer.mozilla.org/en-US/do

(*): similar to how post subject/CW works

I just noticed Teddit and Libreddit use this for comment collapsing too. Meanwhile, Reddit uses a div hell.

@huy_ngo And as I just learned you can default it to shown by adding the open attribute, which acts similarly to the hidden attribute.

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.