1
Fork 0

Format collapses

This commit is contained in:
Jake Howard 2024-08-13 23:04:04 +01:00
parent 57504cd610
commit f207a67a96
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 5 additions and 12 deletions

View file

@ -8,13 +8,10 @@
<div class="code-collapse-wrapper">
<input type="checkbox" id="collapse" />
<label class="open-tag" for="collapse" aria-label="tag">&lt;tag</label>
<div class="collapse-content">
This is the inner content
</div>
<label for="collapse" class="close-tag">&lt;/tag&gt;</div>
<div class="collapse-content">This is the inner content</div>
<label for="collapse" class="close-tag">&lt;/tag&gt;</label>
</div>
<p>Text below the collapse, which should move out the way</p>
</body>
</html>

View file

@ -4,7 +4,6 @@
.collapse-content {
margin: 0.5rem;
overflow: hidden;
}
label {
@ -23,7 +22,8 @@
}
input[type="checkbox"]:not(:checked) {
~ .collapse-content, ~ .close-tag {
~ .collapse-content,
~ .close-tag {
display: none;
}

View file

@ -8,12 +8,9 @@
<div class="collapse-wrapper">
<label for="collapse">Check</label>
<input type="checkbox" id="collapse" />
<div class="collapse-content">
This is the inner content
</div>
<div class="collapse-content">This is the inner content</div>
</div>
<p>Text below the collapse, which should move out the way</p>
</body>
</html>

View file

@ -6,7 +6,6 @@
.collapse-content {
padding: 5px;
overflow: hidden;
}
label {