.u-resize {
  border: 1px solid #aaa;
  box-sizing: border-box;
}

.u-resize {
  border-color: rgba(57,155,252,0.6);
}


.u-resize {
  [class^=resize] {
    position: absolute;
    width: 10px;
    height: 10px;
    z-index: 10;
    box-sizing: border-box;
    border: 3px solid #999;
  }
}

.u-resize [class^=resize] {
  border-color: #09f;
}

.u-resize {
  .resize-topLeft {
    margin-top: -2px;
    margin-left: -2px;
    top: 0;
    left: 0;
    cursor: nwse-resize;
    border-right: none;
    border-bottom: none;
  }
  .resize-top {
    margin-top: -3px;
    margin-left: -5px;
    top: 0;
    left: 50%;
    cursor: ns-resize;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-width: 5px;
  }
  .resize-topRight {
    margin-top: -2px;
    margin-left: -7px;
    top: 0;
    left: 100%;
    cursor: nesw-resize;
    border-left: none;
    border-bottom: none;
  }
  .resize-right {
    margin-top: -5px;
    margin-left: -7px;
    top: 50%;
    left: 100%;
    cursor: ew-resize;
    border-top: none;
    border-left: none;
    border-bottom: none;
    border-width: 5px;
  }
  .resize-bottomRight {
    margin-top: -7px;
    margin-left: -7px;
    top: 100%;
    left: 100%;
    cursor: nwse-resize;
    border-top: none;
    border-left: none;
  }
  .resize-bottom {
    margin-top: -7px;
    margin-left: -5px;
    top: 100%;
    left: 50%;
    cursor: ns-resize;
    border-top: none;
    border-left: none;
    border-right: none;
    border-width: 5px;
  }
  .resize-bottomLeft {
    margin-top: -7px;
    margin-left: -2px;
    top: 100%;
    left: 0%;
    cursor: nesw-resize;
    border-top: none;
    border-right: none;
  }
  .resize-left {
    margin-top: -5px;
    margin-left: -3px;
    top: 50%;
    left: 0%;
    cursor: ew-resize;
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-width: 5px;
  }
}

.m-dashbox {
  .u-resize {
    display: none;
  }
  &:hover {
    & > .u-resize {
      display: block;
      opacity: 0.5;
      box-shadow: 0 0 6px #58bee9;
    }
  }
  &.activated,
  &.multi-selected,
  &.selected {
    & > .u-resize {
      display: block;
      opacity: 1;
    }
  }
}

.m-dashbox .u-resize [class^=resize] {
  display: none;
}

.m-dashbox.activated,
.m-dashbox.selected {
  & > .u-resize > [class^=resize] {
    display: block;
  }
}


.m-dashbox .u-resize {
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
}

.m-dashbox.multi-selected .u-resize {
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-width: 2px;
}
