kai-jacobsen/kontentblocks

View on GitHub
css/sass/partials/_block_style.scss

Summary

Maintainability
Test Coverage
.kb_inactive, .deactivated {
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
  filter: alpha(opacity=90);
  opacity: .9;
}

.kb-module.cantsort .kb-module__header {
  cursor: no-drop !important;
}

.kb_toggle_box {
  float: left;
}

h2.kb-title {
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  background: #eaeaea;
  border: 1px solid #ccc;
  padding-left: 20px !important;

  -webkit-box-shadow: 1px solid #fff;
  -moz-box-shadow: 1px solid #fff;
  box-shadow: 1px solid #fff;
}

.kb-module {
  margin: 0;
  padding: 6px;
  border: none;
  position: relative;
  //z-index: 15;

  .kb-module__controls-inner{
    position: relative;

  }

  &.kb-open .kb-module__header {
    box-shadow:1px 1px 1px #fff;
  }

  &.kb_inactive {
    z-index: 1002;
    position: relative;
  }
}


.ui-icon {
  float: left;
}

.kb-module__title {
  padding: 0px;
  //background: #fafafa;

  .description {
    margin: 0;
    padding: 6px 20px;
  }
}

.kb_toggle_box {
  line-height: 30px;
  margin-right: 8px;
  position: relative;
  top: 7px;
  left: 5px;
  cursor: pointer;
}

.kb_shortcode_display {
  padding: 10px 0;
}

.kb-toggle-editor {
  float: right;
}

.kb_block_area {
  width: 200px;
}

.chzn-container {
  margin-right: 15px;
}

.prop-wrapper {
  clear: both;
}

h5.kb_properties_title {
  font-size: 14px;
  font-style: italic;
  color: #ccc;
  padding-bottom: 4px;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
}

.kb_properties {
  background: #fff;
  padding: 10px;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  clear: both;
}

.edit input {
  width: 180px !important;
  margin-left: -3px;
  //margin-top: 5px;
  background: #f9f9f9;
  font-size: 12px;
  border: 0;
  box-shadow: none;
}

.edit input:focus, .edit input:hover {
  background: #fff;
  border-bottom: 1px solid #aaa;
  border-right: 1px solid #aaa;
}

.chzn-container {
  margin-bottom: 15px;
}

.li.ui-state-highlight {
  background: #f2f2f2;
}


.kb-ajax-status {
  background: url(assets/ajax-loader.gif) no-repeat;
  width: 16px;
  height: 16px;
  padding: 10px 7px;
  float: right;
  background-position: 7px;
  display: none;
  margin-right: 35px;
}

.kb-disabled-icon {
  background: url(assets/disabled.png) no-repeat;
  width: 16px;
  height: 16px;
  float: left;
  border-left: 1px solid #fff;
  border-right: 1px solid #ccc;
  padding: 10px 7px;
  background-position: 7px;
}

.kb-lock {
  width: 16px;
  height: 16px;
  float: left;
  border-left: 1px solid #fff;
  border-right: 1px solid #ccc;
  padding: 10px 7px;
  background-position: 7px;
  background-repeat: none;
  cursor: pointer;
}

.kb-lock.unlocked {
  background-image: url(assets/lock-open.png);
  background-repeat: no-repeat;
}

.kb-lock.locked {
  background-image: url(assets/lock-closed.gif);
  background-repeat: no-repeat;
}

.kb-ajax-status-dark {
  background: url(assets/ajax-loader-dark.gif) no-repeat;
  width: 16px;
  height: 16px;
  padding: 10px 7px;
  float: right;
  background-position: 7px;
  display: none;
}

.kb-name {
  float: left;
  //border-left: 1px solid #fff;
  padding-left: 8px;
  margin-right: 20px;
  font-weight: 500;
}

.kb-sub-name {
  float: left;
  width: auto;
  color: #ccc;
  text-shadow: 1px 1px 1px #fff;
}

/* Helper */
.wp-dialog {
  z-index: 101;
}

.ui-widget-overlay {
  width: 10000px !important;
  height: 10000px !important;
  position: fixed !important;
  z-index: 19;
}

.kb-inactive-indicator {
  width: 30px;
  height: 30px;
  padding-top: 5px;
  float: left;
  display: none;
  cursor: pointer;
  background-color: red;
}

.kb_inactive .kb-inactive-indicator, .deactivated .kb-inactive-indicator {
  display: block;
}

.menu-wrap {

  border-top: 0;
  overflow: hidden;
  float: right;
  position: absolute;
  height: 34px;
  top: 8px;
  right: 7px;

  .module-actions {

    height: 30px;
    overflow: hidden;

    div {

      display: block;
      text-align: center;
      border: none !important;
      float: left;
      cursor: pointer;
      margin-bottom: 0;
      transition:all .3s linear;
      /*background-position: 0 0px !important;*/

      &:hover {
        cursor: pointer;
        /*background-position: 0 -30px !important;*/
      }

      .block-menu-icon {
        display: block;
        font: normal 14px/1 'dashicons' !important;
        text-shadow: 1px 1px 1px #fff;

        &:before {
          width: 20px;
          height: 34px;
          display: block;
          color: rgba(0, 0, 0, 0.5);
          position: relative;
          top: 4px;
          line-height: 25px;
        }

        &:hover {
          &:before {
            color: #333;
          }
        }

        &.kb-delete:before {
          /*background: url('assets/delete.png') no-repeat;*/
          content: '\f117';
        }

        &.kb-delete.kb-batch-marked:before{
          color: $red;
        }

        &.module-status:before {
          /*background: url('assets/power.png') no-repeat;*/
          content: '\f177';
        }
        &.module-clipboard:before {
          /*background: url('assets/power.png') no-repeat;*/
          content: "\f481";
        }

        &.kb-duplicate:before {
          /*background: url('assets/duplicate.png') no-repeat;*/
          content: '\f105';
        }

        &.kb-save:before {
          /*background: url('assets/duplicate.png') no-repeat;*/
          content: "\f463";
        }

        &.kb-save.is-dirty:before{
          color: red;
        }

        &.module-clipboard.kb-in-clipboard:before{
          color: orange;
        }

      }

    }
  }
}

.kb-area .ui-state-highlight {
  background: transparent;
  border: 1px dotted #CCCCCC;

}