.treeview {
    list-style-type: none;
    padding: 0;
    margin: 0;

    ul {
        padding: 0;
        margin: 0;
        margin-left: -1.4em;
    }
}

.nodeicon {
  width: 1em;
  height: 1em;
  position: absolute;
  left: 1em;
  cursor:pointer;
  .TreeButton {
    padding:0px;
    width:auto;
    min-height: auto;
    &:hover svg {
      fill:color(blue, dark);
    }
    &:focus svg {
      fill:color(blue, dark);
    }
  }
}

.active {
    font-weight: bold;
}

.treeview li {
    list-style-type:none;
    margin:0;
    padding: 0.7em 0.7em 0.7em calc(2.8em + 1px);
    position:relative;
}

.treeview ul li::before, .treeview ul li::after {
    content:'';
    left:0;
    position:absolute;
    right:auto;
}

.treeview ul li::before {
  border-left:1px solid #999;  
  bottom:0;
  top:0;
}

.treeview ul li::after {
    border-top:1px solid #999;
    top:calc(1em/2 + 0.7em); //18px;
    width:calc(1em + 1px);
}

.treeview ul li:last-child.haschildren::before {
  height: calc(1em/2 + 0.7em);
}

li.haschildren {
  padding-bottom: 0;
}

li.haschildren > .nodecontent {
  padding-left: 1.4em;
  padding-bottom: 0.7em;
  padding-top: 0.7em;
  margin-left: -1.4em;
  margin-top: -0.7em;
  position: relative;
}

li.haschildren > .nodecontent::before {
  content:'';
  left:0;
  position:absolute;
  right:auto;
  border-left:1px solid #999;  
  bottom:0;
  height: calc(100% - 0.7em - (14/16)em);
}

// set last node tail to line height plus list item top margin
.treeview li:not(.haschildren):last-child::before {
    height: calc(1em/2 + 0.7em);
}

