Skip to content

Visualize Your Ideas With Code

1.1 KB
Raw Blame
.root {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  justify-content: stretch;

  &.vertical {
    flex-direction: column;

    > .left {
      max-height: 100%;
    }
  }

  &:not(.vertical) {
    > .left {
      max-width: 100%;
    }
  }
}

.left {
  flex-grow: 0;
  flex-shrink: 0;
  overflow: hidden;

  .root.hidden > & {
    flex-shrink: 1;
  }
}

.right {
  flex-grow: 1;
  flex-shrink: 1;
  overflow: hidden;
}

.separator {
  touch-action: none;
  width: 16px;
  flex-shrink: 0;
  padding: 0 7px;
  margin: 0 -7px;
  z-index: 1600;
  cursor: ew-resize;

  &::before {
    content: '';
    width: 100%;
    height: 100%;
    display: block;
    background-color: var(--border-color);
  }

  &:hover::before {
    background-color: black;
  }

  &:active::before {
    background-color: var(--theme) !important;
  }

  .root.hidden > & {
    margin-right: -9px;
    &::before {
      background-color: transparent;
    }
  }

  .root.vertical > & {
    cursor: ns-resize;
    width: auto;
    height: 16px;
    padding: 7px 0;
    margin: -7px 0;
  }

  .root.vertical.hidden > & {
    margin-top: -9px;
  }
}