mahaplatform/reframe

View on GitHub
src/controls/toggle_list/style.less

Summary

Maintainability
Test Coverage
.reframe-form .reframe-toggle-list {
  height: ~"calc(100vh - 50px)";
}
.reframe-toggle-list {
  flex: 1;
  position: relative;
}
.reframe-toggle-list-header .reframe-searchbox {
  background: @black;
}
.reframe-toggle-list-filter {
  display: flex;
}
.reframe-toggle-list-body {
  background-color: @white;
  box-shadow: -5px 0 5px fadeout(@black, 95);
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
}
.reframe-toggle-list-summary {
  padding: 0.4em;
  border-bottom: 1px solid fadeout(@black, 90);
  background-color: fadeout(@black, 90);
  color: fadeout(@black, 60);
  max-height: 8em;
  line-height: 1.8em;
  .scrollable();
  min-height: 3.3em;
}
.reframe-toggle-list-summary-token {
  color: fadeout(@black, 60);
  display: inline-block;
  margin: 0.4em;
  background-color: @white;
  border-radius: 0.4em;
  font-size: 0.8em;
  position: relative;
}
.reframe-toggle-list-summary-token-label {
  padding: 0 2em 0 .8em;
}
.reframe-toggle-list-summary-token-remove {
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  border-radius: 0 0.4em 0.4em 0;
  display: flex;
  padding: 0.4em;
  i {
    margin: auto;
  }
}
.reframe-search-item.checkeds {
  background-color: fadeout(@yellow, 90);
}
.reframe-search-item-icon {
  .fa {
    font-size: 1.5em;
  }
  .fa-circle-o {
    color: fadeout(@black, 80);
  }
  .fa-check-circle {
    color: @blue;
  }
}

@media (max-width: 768px) {
  .reframe-toggle-list {
    &.filtering {
      .reframe-toggle-list-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
        opacity: 0.4;
      }
      .reframe-toggle-list-filter {
        .translateY(0);
      }
    }
  }
  .reframe-toggle-list-overlay  {
    .transition(opacity .25s ease-in-out 0s);
    background-color: @black;
    opacity: 0;
  }
  .reframe-toggle-list-filter {
    .translateY(100%);
    .transition(transform .5s ease-in-out 0s);
    position: absolute;
    top: 3.5em;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
  }
}
@media (min-width: 769px) {
  .reframe-toggle-list {
    &.filtering {
      .reframe-toggle-list-body {
        left: ~"calc(100% / 3)";
      }
    }
  }
  .reframe-toggle-list-body {
    .transition(left .25s ease-in-out 0s);
  }
  .reframe-toggle-list-filter {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: ~"calc(100% / 3)";
  }

}