zeshanshani
2/15/2015 - 8:01 AM

Default SCSS styling of jQuery SelectBox Plugin

Default SCSS styling of jQuery SelectBox Plugin

// This is the default SCSS styling of jQuery SelectBox
// by Zeshan Ahmed @zeshanshani22

.sbHolder {
  width: 100%;
  height: 36px;
  position: relative;
  background: #fff;

  .sbSelector {
    display: block;
    font-weight: normal;
    background: #fff;
    font-size: 17px;
    padding: 9px 13px;
    height: 36px;
    border: none;
    box-shadow: none;
    color: #bcbcbc;
    border-radius: 0;
    line-height: normal;

    &:hover {
      text-decoration: none;
    }
  }

  .sbToggle {
    position: absolute;
    right: 11px;
    top: 50%;
    margin-top: -3px;
    @include triangle(11px 5px, #bcbcbc, down);
  }

  .sbOptions {
    position: absolute;
    background-color: #fff;
    overflow-y: scroll;
    overflow-x: hidden;
    max-height: 264px !important;
    z-index: 100;
    list-style: none;
    top: 109% !important;
    left: 0;
    width: 100%;
    min-width: 280px;
    padding: 0;
    margin: 0;

    a {
      display: block;
      color: #bcbcbc;
      font-size: 14px;
      font-weight: normal;
      padding: 9px 13px;
      height: 36px;
      line-height: normal;

      &:hover, .sbActive {
        background-color: #e8e8e8;
        text-decoration: none;
      }
    }


    li {
      padding: 0 !important;
    }
  }
}
/* SelecBox Styling */
.sbHolder {
  position: relative;
  background: #fff;
  cursor: default;
  height: 48px;
  float: left;
  color: #9c9898;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%!important;
  font: 15px/30px Helvetica, Arial, sans-serif;
}

.sbSelector {
  display: block;
  padding: 10px 12px 6px;
  text-decoration: none;
  color: #9c9898;
  border: 1px solid #ffd110;
}

.sbSelector:hover {
  text-decoration: none;
}

.sbToggle {
  width: 44px;
  height: 47px;
  background: url(images/select-bg.jpg) no-repeat 50% 50%;
  position: absolute;
  right: 0;
  top: 0;
  cursor: pointer;
}

.sbOptions {
  width: 100%;
  border: 1px solid #ffd110;
  border-top: none;
  border-width: 1px;
  top: 100% !important;
  background-color: #fff;
  overflow-y: scroll;
  overflow-x: hidden;
  margin: 0;
  position: absolute;
  overflow: auto;
  background: #fff;
  z-index: 2000;
  max-height: 130px !important;
}

.sbOptions a {
  font: 15px/30px Helvetica, Arial, sans-serif;
  text-decoration: none;
  color: #9c9898;
  padding: 5px 12px;
  display: block;
  cursor: default;
  height: 1%;
}

.sbOptions a:hover,
.sbOptions a.sbActive {
  text-decoration: none;
  background: #ffd110;
  cursor: pointer;
  color: #fff;
}

.sbOptions a:hover,
.sbOptions a:focus,
.sbOptions a:active {
  outline: none;
}

.sbOptions li {
  padding: 0 !important;
}