kai-jacobsen/kontentblocks

View on GitHub
css/sass/partials/_frontend/_menubar.scss

Summary

Maintainability
Test Coverage

.kb-menubar-container * {
  box-sizing: border-box;
}

.kb-menubar-container {
  position: fixed;
  bottom: -40px;
  min-height: 40px;
  border-top: 1px #aaa solid;
  border-right: 1px #aaa solid;
  width: 100%;
  background: #f2f2f2;
  z-index: 1995;
  box-sizing: border-box;
  transition: all .3s linear;

  .kb-brand {
    font-size: 11px !important;
    color: #999 !important;
    position: absolute !important;
    right: 8px !important;
    line-height: 24px !important;
  }

  &.kb-menubar-show {
    bottom: 0;
  }

  &.kb-menubar-show-partly {
    bottom: -20px;
  }

  .kb-menubar-toggle {
    position: absolute;
    right: 8px;
    top: -25px;
    width: 25px;
    height: 25px;
    padding-left: 0px;
    padding-top: 4px;
    background: #eaeaea;
    z-index: 9999;
    cursor: pointer;
    color: #666;
    transition: all .3s linear;
    border-top: 1px #aaa solid;
    border-left: 1px #aaa solid;
    border-right: 1px #aaa solid;

    &:hover {
      color: #666;
    }

    .genericon:before {
      text-align: center;
    }
  }

  .kb-menubar-add_module {
    position: absolute;
    right: 35px;
    top: -25px;
    width: 25px;
    height: 25px;
    padding-left: 0px;
    padding-top: 4px;
    background: #eaeaea;
    z-index: 9999;
    cursor: pointer;
    color: #666;
    transition: color .3s linear;
    border-top: 1px #aaa solid;
    border-left: 1px #aaa solid;
    border-right: 1px #aaa solid;

    &:hover {
      color: #666;
    }

    .genericon:before {
      text-align: center;
    }
  }

  ul {
    margin: 0 !important;
    padding: 0 !important;
  }

  ul li {
    padding: 4px;
    padding-left: 10px;
    background: transparent;
    border-left: 1px solid #005580;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition:all .3s linear;
    opacity: .5;
    font-family: 'Open-Sans', sans-serif !important;
    width: 110px !important;
    display: block;
    float: left;

    &:hover {
      background-color: #eaeaea !important;
      width: 150px !important;
    }

    &:last-child {
      border-bottom: none;
    }

    &.in-viewport {
      border-left-color: green;
      opacity: 1;
    }

    &.in-viewport-active {
      background: #eaeaea;
    }

    &.isDirty {
      .kb-js-inline-update span {
        color: red;
      }
    }

    span {
      margin: 0;
      padding: 0;
    }

    div.kb-menubar-item__name {
      color: #666;
      font-size: 12px !important;
      line-height: 150%;
    }

    div.kb-menubar-item__id {
      color: #999;
      font-size: 11px;
      line-height: 100%;
    }

  }

  .kb-menubar-item__wrapper {
    width: 80%;
    float: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .kb-menubar-item__actions {
    width: 30px;
    position: absolute;
    right: 0;
    top: 4px;
    display: none;

    a {
      color: #666 !important;
      border-bottom: none;
      line-height: 100%;
      display: block;
      text-decoration: none !important;

      &:hover {
        border: 0;
        color: #111;
      }

      .dashicons {
        font-size: 16px !important;
        width: 16px !important;
        height: 16px !important;
      }
    }

  }

}

//body.admin-bar {
//
//  .kb-module-nav-container {
//    top: 32px;
//  }
//
//}

.module.kb-menubar-active {
  opacity: .7;
  position: relative;

}

.kb-module-controls__title {
  background-color: #eaeaea;
  overflow: hidden;
  border-bottom: 1px solid #aaa;
}

.kb-menubar-tab {
  color: #666;
  top: -25px;
  display: block;
  float: left;
  border-right: 1px #aaaaaa solid;
  height: 25px;
  padding: 4px 8px;
  box-sizing: border-box;
  font-size: 12px;
  vertical-align: middle;
  line-height: 18px !important;
  cursor: pointer;
  font-family: 'Open-Sans', Arial, Helvetica, sans-serif !important;

  &.kb-tab-active {
    color: #333;
    font-weight: 700;
  }
}

.kb-menubar-tab__modules {
  left: 0;
  padding-right: 15px;
}

.kb-menubar-tab__areas {
  left: 69px;
}

.kb-menubar-container ul li:hover .kb-menubar-item__actions {
  display: block;
}