xxxxxxxxxx
<html>
<head>
<style>
details[open] > summary {
color: green;
}
</style>
</head>
<body>
<h1>Details element can be styled using CSS based on its state</h1>
<p>In this example the label will change color when opened.</p>
<details>
<summary>Server status</summary>
<p>All servers are operating normally.</p>
</details>
</body>
</html>