Details element styled

Recipe 8.2 Create a native disclosure widget

Sample:

Show details

Detailed content goes here…

Code:

<style>
   summary::marker {
    content: "+ ";
  }

   details[open] summary::marker {
    content: "- ";
  }
</style>

<details>
  <summary>Show details</summary>
  
  <p>Detailed content goes here…</p>
</details>