<!-- Warning !!!
Just an experiment.
Probably not accessible
-->
<details>
<summary>Show Retired things</summary>
<details class="tier1">
<summary><span>Show</span> <b>Hide</b> Tier 1 Retired things</summary>
<div class="modal">
<div class="modal-content">Modal 1</div>
</div>
</details>
<details class="tier2">
<summary><span>Show</span> <b>Hide</b> Tier 2 Retired things</summary>
<div class="modal">
<div class="modal-content">Modal 2</div>
</div>
</details>
<details class="tier3">
<summary><span>Show</span> <b>Hide</b> Tier 3 Retired things</summary>
<div class="modal">
<div class="modal-content">Modal 3</div>
</div>
</details>
</details>
summary {
padding: 0.5rem 1rem;
border: 1px solid #000;
border-radius: 10px;
width: fit-content;
background: linear-gradient(cyan, teal);
color: #fff;
cursor: pointer;
margin: 0 0 0.5rem;
}
details details[open] .modal {
position: fixed;
display: flex;
place-iems: cnter;
z-index: 999;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.9);
}
details details[open] > summary {
position: fixed;
top: 0.5rem;
right: 0;
left: 0;
margin: auto;
z-index: 1000;
}
.modal-content {
padding: 1rem 1rem 1rem;
max-width: 860px;
min-height: 200px;
width: 100%;
margin: auto;
background: #fff;
border: 5px solid red;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}
summary b {
display: none;
}
details details[open] summary span {
display: none;
}
details details[open] summary b {
display: inline;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.