hummingbird-me/hummingbird

View on GitHub
app/assets/stylesheets/partials/community-rating.css.scss

Summary

Maintainability
Test Coverage
.awesome-rating-widget {
  display: inline-block;
}

.sidebar-title {
  margin-bottom: 5px;
  color: #fff;
  font-size: 17px;
  font-weight: normal;
}

.personal-rating {
  @extend .col-xs-12;
  @extend .col-sm-12;

  text-align: center;
  float: left;
  padding: 0;
  margin-top: 10px;
  margin-bottom: 0;
  border-bottom: 1px solid darken(#2f343b,5);
  padding-bottom: 15px;

  @media (min-width: 768px) {
    padding: 15px 0 0 0;
    border-top: 1px solid #ddd;
  }

  .sidebar-title {
    margin-bottom: 5px;
  }

  .icon-container {
    font-size: 30px;
    padding: 0 2px;
    @media (min-width: 768px) and (max-width: 1200px) {
      font-size: 25px;
    }

    /* Simple rating icons. */
    .fa-frown-o, .fa-meh-o, .fa-smile-o {
      color: #999;
      padding: 0 4px;
      font-size: 1.2em;
    }

    .active {
      color: #ec8661;
    }

    .simple:hover {
      color: black;
    }
  }

  &.active {
    .icon-container {
      color: #ec8661;
    }
  }
}


.community-rating {
  @extend .col-xs-12;

  padding-top: 10px;
  padding-bottom: 25px;
  .sidebar-title {
    margin-bottom: 15px;
  }
}

.community-rating-wrapper {
  position: relative;
  height: 70px;
  text-align: center;

  li {
    display: inline-block;
    padding-right: 4px;
    width: 10%;
    position: relative;
    &:last-child {
      padding-right: 0;
    }
    &:hover {
      .rating-value {
        background: #16a085;
      }
    }
  }
}

.rating-column {
  bottom: 0;
  height: 70px;
  position: inherit;
  background: #CFCFCF;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;

  &.last {
    margin-right: 0;
  }
}

.rating-value {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #737373;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  transition: .2s ease-in;
}

.hb-score {
  text-align: center;
  border-bottom: 1px solid #C0C0C0;
  margin-bottom: 15px;
  color: #737373;
  h3 {
    font-weight: normal;
    margin-top: 0;
  }
  .highlight {
    color: #16a085;
    font-weight: 400;
  }
}

.rating-legend {
  .lowest-rating, .highest-rating {
    color: #8e8e8e;
    font-size: 13px;
  }
  .highest-rating {
    float: right;
  }
}