qlik-oss/sn-org-chart

View on GitHub
src/styles/nodes.less

Summary

Maintainability
Test Coverage
.sn-org-chart {
  overflow: hidden;

  .sn-org-nodes {
    position: absolute;
    transform-origin: 0% 0%;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    backface-visibility: hidden;

    &:not(.org-disable-transition) {
      transition-property: all;
      transition-duration: 0.5s;
    }

    .sn-org-traverse {
      position: absolute;
      background-color: white;
      font-size: 20px;
      font-weight: bold;
      border-radius: 3px;
      border: 1px solid #8c8c8c;
      text-align: center;
      line-height: 24px;
    }

    .sn-org-root {
      position: absolute;
      background-color: #8c8c8c;
      width: 20px;
      height: 20px;
      border-radius: 20px;
    }

    .sn-org-card {
      position: absolute;
      .sn-org-card-text {
        padding-left: 5px;
        padding-right: 5px;
        border-radius: 3px;
        &.selected {
          border: 4px solid black;
          border-radius: 4px;
        }
        &.not-selected {
          opacity: 0.5;
        }
      }

      .sn-org-card-title {
        font-size: 14px;
        font-weight: bold;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .sn-org-card-label {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
}