hummingbird-me/hummingbird

View on GitHub
app/assets/stylesheets/partials/user-activity-feed.css.scss

Summary

Maintainability
Test Coverage
.profile-content  {
  @extend .container;
  margin-top: 10px;
}

.mobile-tab {
  @extend .col-md-6;
  @extend .col-xs-6;

  display: none;
  border-radius: 0px;
  margin: 10px 0;
  padding: 15px 0;
  width: 100%;
  @media (max-width: 768px) {
    display: block;
    & + .row {
      margin: 0;
      .secondary-info,
      .user-feed {
        padding: 0;
      }
    }

    /* Initial status */
    &:not(:target) + .mobile-tab:not(:target){
      & + .row > .secondary-info { display: none !important; }
      display: none;
    }

    /* Toggled status */
    &:target{
      display: none;
      &#right-column + .row .user-feed { display: block; }
      &#right-column + .row .secondary-info { display: none !important; }
      &#left-column + .row .secondary-info { display: block; }
      &#left-column + .row .user-feed { display: none !important; }
    }

    &:after {
      @extend .clearfix;
    }
  }
}

.secondary-info {
  @extend .col-sm-5;
  @extend .col-md-5;
  @extend .clearfix;
  padding-right: 0px;
  display: block;
}

.user-about-panel {
  @extend .panel;
  @extend .panel-default;
  @extend .clearfix;

  .edit-bio-chars {
    display: block;
    float: right;
    margin: -5px 0 1px 0;
    color: #999;
    font-size: 12px;
    &.noleft {
      color: #FF6347;
    }
  }

  .edit-bio {
    width: 100%;
    border-radius: 3px;
    border: 1px solid #ddd;
    height: 100px;
    padding: 10px;
    resize: vertical;
  }

  .about {
    font-size: 16px;
    word-wrap: break-word;
  }

  .about-none {
    display: block;
    text-align: center;
    color: #999999;
  }

  .user-interests {
    @extend .col-xs-12;
    margin: 10px 10px 0 -8px;
    padding: 0;
    li {
      @extend .clearfix;
      margin-bottom: 5px;
      &:last-child {
        margin-bottom: 0;
      }
    }

    .interest-waifu {
      position: relative;
      .ember-select {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 5;
        margin-top: 0;
        margin-bottom: 0;
      }
      input {
        padding-left: 122px !important;
      }
      .tt-suggestion {
        &:hover {
          background-color: #e67e22;
          color: #fff;
          cursor: pointer;
        }
      }
      .tt-cursor {
        background-color: #e67e22;
        color: #fff;
      }
    }

    .remove-waifu {
      margin-top: 3px;
      padding-left: 10px;
      background: #acacac;
      font-size: 85%;
      color: #fff;
      transition: .2s ease-in;
      &:hover {
        background: darken(#acacac,10);
      }
    }

    .interest-icon {
      @extend .col-xs-1;
      padding-left: 0;
      padding-right: 0;
      text-align: center;
      position: relative;
      top: -1px;
      color: #999999;
      .fa {
        vertical-align: sub;
      }
    }

    .interest {
      @extend .col-xs-11;
      padding-left: 0;
      padding-right: 0;
      font-size: 15px;
      word-break: break-all;

      input {
        width: 100%;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 16px;
        padding: 3px 10px;
      }

      select {
        border: 1px solid #ddd;
        border-radius: 3px;
        padding: 2px 5px;
        margin: 3px 0;
        font-size: 16px;
      }
    }
  }

  .submit-form {
    @extend .col-sm-12;
    margin-bottom: 15px;
    text-align: right;

    button {
      background: $orange;
      color: #fff;
      border: none;

      &:hover {
        background: $darkOrange;
      }

      &:active {
        background: darken($darkOrange, 5);
      }
    }
  }
}

.grid-thumb {
  padding: 5px !important;
  float: left !important;

  .thumbnail {
    padding: 0;
    border: none;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;

    img {
      border-radius: 3px;
    }
  }
}

.grid-list {
  width: 100%;
  padding: 8px 15px;
  margin: 10px 0;
  box-shadow: 0 0 1px #999;

  &:hover {
    cursor: move !important;
  }

  .grid-list-thumb {
    width: 50px;
    margin-right: 15px;
    display: inline-block;
  }

  .grid-position {
    @extend .pull-right;
    display: block;
    font-size: 1.1em;
    font-weight: bold;
    color: #999;
  }
}

.move-overlay {
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 25px;
  line-height: 190px;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  text-align: center;
  right: 0;
  transition: .3s ease-in;
  opacity: 0;

  &.editing {
    opacity: 1;
    cursor: move;
  }

  &:hover {
    background: rgba(0,0,0,.8);
  }
}

.photos-videos {
  .grid-thumb {
    @extend .col-sm-3;
  }
}

.favorite-anime {
  .grid-thumb {
    @extend .col-xs-4;
    @extend .col-sm-4;
  }
  .grid-list {
    padding: 0;
    height: 50px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  .grid-list-title {
    position: relative;
    top: -6px;
    max-width: 60%;
    text-overflow: ellipsis;
    overflow: hidden;
    display: inline-block;
    white-space: nowrap;
  }
  .grid-position {
    padding: 11px;
    .fa {
      cursor: pointer;
      opacity: .6;
      &:hover {
        opacity: 1;
      }
    }
  }
  .fav-search {
    height: auto;
    padding: 10px;
    cursor: initial !important;
    input {
      border: none;
      color: #e67e22;
      width: 100%;
    }
    .badge {
      display: none;
    }
    .fa {
      cursor: pointer;
      opacity: 1;
      color: #1abc9c;
      &:hover {
        opacity: 1;
        color: darken(#1abc9c, 10);
      }
    }
  }
  .search-result {
    cursor: initial !important;
  }
}

.no-favorites {
  h3 {
    margin-top: 5px;
  }
}

.anime-breakdown-panel, .photos-videos, .favorite-anime {
  @extend .panel;
  @extend .panel-default;
  float: left;
  width: 100%;
}

.media-grid {
  @extend .clearfix;
}

.anime-breakdown-panel{
  .breakdown-graph {
    text-align: center;

    .breakdown-graph-data {
      position: relative;
      color: #ec8661;
      font-size: 2em;

      .breakdown-number {
        display: inline-block;
        position: absolute;
        text-align: center;
        margin-top: -0.8em;
        width: 100%;
        left: 0;
        top: 50%;
      }
    }
  }

  .breakdown-info {
    text-align: center;

    .breakdown-infotitle {
      display: block;
      font-weight: bold;
    }

    .breakdown-infotext {
      font-size: 0.89em;
    }
  }

  .breakdown-genrelist {
    li {
      padding: 7px 0 3px 0;
      border-bottom: 1px solid #f2f2f2;

      &:last-of-type {
        border: none;
      }

      span {
        font-family: "klavika", Helvetica, Arial, sans-serif;
        font-weight: bold;
      }
    }

    .breakdown-numbr {
      display: inline-block;
      float: right;
      color: #ec8661;
    }
  }

  .breakdown-watched {
    display: flex;
    flex-align: center;
    align-items: center;
  }

  .breakdown-time {
    color: #999;
    strong {
      color: #686868;
      font-weight: normal;
    }
  }

  .breakdown-icon {
    display: inline-block;
    min-width: 60px;
    i {
      color: #686868;
      font-size: 2.8em;
    }
  }
}

.user-feed {
  @extend .col-sm-7;
  @extend .col-md-7;

  padding-left: 15px;
  @media (max-width: 768px) {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.status-update-panel {
  @extend .panel;
  @extend .panel-default;

  .panel-footer {
    @extend .clearfix;
    display: none;
    background: transparent;
    border: none;
    padding-top: 0;
    margin-top: -25px;
  }
}

.follow-bubbles {
  padding-left: 15px;
  padding-right: 15px;
  margin-top: 15px;
  max-height: 480px;
  overflow: auto;

  li {
    @extend .col-sm-6;
    @extend .col-xs-12;

    padding-left: 0;
    padding-right: 10px;
    @media (max-width: 768px) {
      padding-right: 0;
    }
    @media (min-width: 768px) {
      &:nth-child(even) {
        padding-right: 0;
      }
    }

    .user-bubble {
      @extend .clearfix;
      border: 1px solid #ddd;
      border-radius: 3px;
      padding: 10px;
      margin-bottom: 10px;
      transition: .2s ease-in;

      .bubble-avatar {
        @extend .col-sm-2;
        @extend .col-xs-2;
        padding: 0;
      }

      .bubble-name {
        @extend .col-sm-10;
        @extend .col-xs-10;
        color: #333;
        position: relative;
        top: 5px;
        transition: .3s ease-in;
      }

      &:hover {
        border-color: $orange;
        .bubble-name {
          color: $darkOrange;
        }
      }
    }
  }
}