Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<h1>Pure CSS - Accordion With Input Edit</h1>
<ul class="treeview checklist">
  <li>
    <input type="checkbox" name="tall" id="tall">
    <label for="tall">
      <div class="ball" data-id="1"></div>
      <input type="text" value="Input value">
      <div class="action-list">
        <i class="fa fa-trash"></i>
        <i class="fa fa-plus"></i>
      </div>
    </label>
    <ul>
      <li>
        <input type="checkbox" name="tall-1" id="tall-1">
        <label for="tall-1">
          <div class="ball" data-id="2"></div>
          <input type="text" value="Text input 1">
          <div class="action-list">
            <i class="fa fa-trash"></i>
            <i class="fa fa-plus"></i>
          </div>
        </label>
        <ul>
          <li>
            <label>
              <div class="ball" data-id="3"></div>
              <input type="text" value="Text input 2">
            </label>
          </li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
              
            
!

CSS

              
                *,
*:before,
*:after {
  box-sizing: border-box;
  outline: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/*Title Default*/
body {
  background: #343436;
  color: #777;
  font-family: arial;
}
h1 {
  margin: 1em 0;
  text-align: center;
  border-bottom: 1px dashed;
  padding-bottom: 1em;
  font-weight: lighter;
}

/*Treeview ***********************************************/
.treeview input[type=checkbox]{
  display:none
}


.treeview,
.treeview ul{
	padding: 0;
	margin: 0;
	overflow: hidden;
}

.treeview li{
	padding-left: 27px;
	position: relative;
	font-size: 1rem;
  margin-top: 4px;
  display: flex;
  flex-direction: column
}
.treeview > li{
	padding-left: 0;
}

.treeview ul{
	max-height: 0;
	-webkit-transition: .8s ease;
	-moz-transition: .8s ease;
	-ms-transition: .8s ease;
	-o-transition: .8s ease;
}

.treeview li input:nth-of-type(1):checked ~ ul{
	max-height: 1000px;
}

.treeview li label{
  padding: 16px;
  padding-left: 78px;
  background-color: #f3f3f4;
  cursor: pointer;
  border-radius: 100px;
  height: 65px;
  font-size: 13px;
  display: flex;
  align-items: center;
}
.treeview li label i{
  font-size: 14px
}
.treeview li label > span{
  margin: 0 20px
}
.treeview li label input[type=text]{
  flex: 1;
  color: #676A6C;
  background: white;
  border: none;
  border-radius: 3px;
  transition: .2s ease;
  padding: 9px;
  margin-left: 10px;
  background: none
}
.treeview li label input[type=text]:focus,
.treeview li label input[type=text]:hover{
  background: white
}

.treeview li label:not(.child):before{
  transition: .3s ease;
  position: absolute;
  margin-left: -16px;
}
.treeview li label:not(.child):before{
  font: normal normal normal 14px/1 FontAwesome;
	content: "\f054";
}

.treeview li input[type=checkbox]:checked + label:before{
  transform: rotate(90deg);
}
.treeview .ball{
  left: 16px;
  margin-left: -60px;
  padding-right: 30px;
}
.treeview .ball:before{
  color: #fff;
  position: relative;
  display: flex;
  border-radius: 50%;
  background-color: #23c6c8;
  align-items: center;
  height: 23px;
  width: 23px;
  font-size: 13px;
  justify-content: center;
  content: attr(data-id);
}
.treeview .action-list{
  margin-left: auto
}
.treeview .action-list i{
  margin-left: 15px
}
              
            
!

JS

              
                
              
            
!
999px

Console