summary { margin: 10px; } summary:hover { background: #e1e1e1; } .passed { color: green; } .failed { color: red; } .pending { color: orange; } .collapse { cursor: pointer; display: block; background: white; } .collapse + input { display: none; /* hide the checkboxes */ } .collapse + input + div { display: none; } .collapse + input:checked + div { display: block; } .section { padding-top: 10px; }