Skip to content

Instantly share code, notes, and snippets.

@hkkcngz
Created September 4, 2023 19:50
Show Gist options
  • Save hkkcngz/9ec755787cc0686ae89dbb829c78349e to your computer and use it in GitHub Desktop.
Save hkkcngz/9ec755787cc0686ae89dbb829c78349e to your computer and use it in GitHub Desktop.
Read More Elements Just Pure CSS
<input type="checkbox" class="read-more-state" id="el-1" />
<div class="read-more-wrap">
${ALLINONEPROJECTS}
</div>
<label for="homeprojects" class="read-more-trigger"></label>
.read-more-state {
display: none;
}
.read-more-target {
opacity: 0;
max-height: 0;
font-size: 0;
transition: .25s ease;
}
.read-more-state:checked ~ .read-more-wrap .read-more-target {
opacity: 1;
font-size: inherit;
max-height: 999em;
}
.read-more-state ~ .read-more-trigger:before {
content: 'Daha fazla göster';
}
.read-more-state:checked ~ .read-more-trigger:before {
content: 'Daha az göster';
}
.read-more-trigger {
cursor: pointer;
display: inline-block;
padding: 0 .5em;
color: #666;
font-size: .9em;
line-height: 2;
border: 1px solid #ddd;
border-radius: .25em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment