Skip to content

Instantly share code, notes, and snippets.

@m59peacemaker
Created August 25, 2014 14:25
Show Gist options
  • Save m59peacemaker/2c21e3ffaffb343a1716 to your computer and use it in GitHub Desktop.
Save m59peacemaker/2c21e3ffaffb343a1716 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<ul class="checkbox-tree">
<li>
<i class="plus"></i>
<input id="category" type="checkbox">
<label for="category">Category</label>
<ul>
<li>
<input type="checkbox">
<label>Foo</label>
</li>
<li>
<input type="checkbox">
<label>Bar</label>
</li>
</ul>
</li>
</ul>
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
.plus:after {
content: '+';
}
.checkbox-tree {
ul {
display: none;
}
input:checked ~ ul {
display: block;
}
list-style: none;
input {
//display: none;
}
}
.plus:after {
content: '+';
}
.checkbox-tree {
list-style: none;
}
.checkbox-tree ul {
display: none;
}
.checkbox-tree input:checked ~ ul {
display: block;
}
<ul class="checkbox-tree">
<li>
<i class="plus"></i>
<input id="category" type="checkbox">
<label for="category">Category</label>
<ul>
<li>
<input type="checkbox">
<label>Foo</label>
</li>
<li>
<input type="checkbox">
<label>Bar</label>
</li>
</ul>
</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment