hummingbird-me/kitsu-web

View on GitHub
app/styles/components/_onebox.scss

Summary

Maintainability
Test Coverage
.stream-content {
  video {
    width: 100%;
    height: auto;
    max-height: 400px;
  }
}
.comment-body {
  video {
    max-width: 100%;
    height: auto;
    max-height: 250px;
  }
}

.imgur-album {
  border-radius: 3px;
  overflow: hidden;
  background: #141518;
  a {
    display: block;
    text-align: center;
    &:hover {
      text-decoration: none;
    }
  }
  .outer-box {
    display: block;
    position: relative;
    width: 100% !important;
  }
  .inner-box {
    display: block;
    padding: 10px 15px;
    padding-right: 90px;
    background: #34373C;
    color: #fff;
    text-align: left;
    &::after {
      content: '';
      background: url(http://s.imgur.com/images/imgur-logo.svg?1);
      width: 71px;
      height: 25px;
      position: absolute;
      background-size: cover;
      right: 15px;
      top: 10px;
    }
  }
}
.amazon {
  border-radius: 3px;
  position: relative;
  text-align: center;
  .source {
    border-bottom: 1px solid #eee;
    padding: 10px 15px;
    text-align: left;
    a {
      color: #333;
    }
  }
  .onebox-body img {
    width: 100%;
    max-width: 250px;
  }
  h3 {
    font-size: 16px;
    border-top: 1px solid #eee;
    text-align: left;
    padding: 15px;
    padding-bottom: 0;
  }
  p {
    text-align: left;
    padding: 0 15px;
    font-size: 12px;
    &:last-child {
      position: absolute;
      top: 10px;
      right: 15px;
      margin-bottom: 0;
      font-size: 16px;
      padding: 0;
    }
  }
}

.onebox-twitterstatus {
  border: 1px solid #eee;
  border-radius: 3px;
  .source {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    a {
      color: #333;
    }
  }
  .onebox-body {
    padding: 15px;
    padding-bottom: 10px;
    img {
      border-radius: 6px;
      float: left;
      margin-right: 15px;
    }
    h4 {
      font-size: 16px;
      margin-bottom: 0;
    }
    .tweet {
      font-size: 14px;
    }
    .date {
      display: block;
      margin-top: 18px;
      padding-top: 5px;
      font-size: 12px;
      border-top: 1px dotted #eee;
      a {
        color: #a9a9a9;
      }
    }
  }
}

.onebox-spotify-com {
  border: 1px solid #eee;
  border-radius: 3px;
  text-align: center;
  .source {
    text-align: left;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    a {
      color: #333;
    }
  }
  .onebox-body {
    padding: 15px;
    img {
      float: left;
      max-width: 60px;
      border-radius: 3px;
      margin-right: 15px;
    }
    h3 {
      text-align: left;
      font-size: 18px;
      margin-bottom: 0;
    }
    p {
      text-align: left;
    }
  }
}

.onebox-youtube, .onebox-twitch-tv, .onebox-vimeo-com, .onebox-dailymotion-com {
  @extend .embed-responsive;
  @extend .embed-responsive-16by9;
  iframe {
    @extend .embed-responsive-item;
  }
}

.stream-content {
  .onebox-image {
    background: #fafafa;
    text-align: center;
    img {
      max-height: 810px;
    }
  }
}

.comment-body {
  .onebox-image img {
    max-height: 200px;
  }
}

.onebox-wikipedia {
  border: 1px solid #eee;
  border-radius: 3px;
  margin-bottom: 10px;
  .source {
    border-bottom: 1px solid #eee;
    padding: 0 15px;
    a {
      color: #333;
    }
  }
  .onebox-body {
    padding: 15px;
    img {
      float: left;
      margin-right: 15px;
      border-radius: 3px;
    }
    h3 {
      font-size: 20px;
    }
  }
}