Skip to content

Instantly share code, notes, and snippets.

@jeef3
Created August 29, 2013 02:41
Show Gist options
  • Save jeef3/6373707 to your computer and use it in GitHub Desktop.
Save jeef3/6373707 to your computer and use it in GitHub Desktop.
Untitled
.tree, .branches {
list-style: none;
}
.is-collapsed .branches {
display: none;
}
.is-expanded .branches {
display: block;
}
.folder.is-expanded .folder-name:before {
content: '-';
}
.folder.is-collapsed .folder-name:before {
content: '+';
}
<ul class="tree">
<li class="folder is-expanded">
<span class="folder-name">First Folder</span>
<ul class="branches">
<li class="file">File one</li>
</ul>
</li>
<li class="folder is-collapsed">
<span class="folder-name">My Folder</span>
<ul class="branches">
<li class="file">Some file</li>
<li class="folder">
<span class="folder-name">Sub-folder</span>
<!-- empty folder -->
</li>
</ul>
</li>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment