hummingbird-me/kitsu-web

View on GitHub
app/styles/components/_user-stats.scss

Summary

Maintainability
Test Coverage
.user-stats-panel {
  background: $foreground-background-color;
  border-radius: 5px;
  border: 1px solid $divider-color;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 17px;
  margin-bottom: 20px;
}

.user-stats-heading {
  border-bottom: 1px solid $divider-color;
  padding-bottom: 15px;
  margin-bottom: 15px;
  font-weight: bold;
}

.user-stats-empty {
  display: flex;
  flex-direction: column;
  text-align: center;
  font-size: 14px;
}

.category-breakdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  color: $body-secondary-text-color;
}

.graph {
  position: relative;
}

.graph-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.graph-percent {
  font-size: 28px;
  color: $body-text-color;
}

.graph-genre {
  font-size: 12px;
}

.graph-legend {
  font-size: 13px;
  line-height: 1.3rem;
  td {
    padding-right: 7px;
  }
}

.legend-bar-container {
  position: relative;
  width: 40px;
  height: 6px;
}

.legend-bar {
  border-radius: 8px;
}

.time-spent-card {
  position: relative;
  margin-top: 25px;
  border-radius: 5px;
  border: 1px solid $divider-color;
  background: $background-color;
  padding: 13px;
}

.time-spent-badge > svg {
  position: absolute;
}

.time-spent-anime-1 > svg {
  left: 2px;
  bottom: -7px;
  width: 65px;
  height: 80px;
  clip-path: inset(0px 0px 7px 0px);
}

.time-spent-anime-2 > svg {
  left: -5px;
  bottom: -6px;
  width: 80px;
  height: 75px;
  clip-path: inset(0px 0px 6px 0px);
}

.time-spent-anime-3 > svg {
  left: -5px;
  bottom: -9px;
  width: 80px;
  height: 76px;
  clip-path: inset(0px 0px 9px 0px);
}

.time-spent-anime-4 > svg {
  left: -7px;
  bottom: -7px;
  width: 80px;
  height: 76px;
  clip-path: inset(0px 0px 7px 0px);
}

.time-spent-manga-1 > svg {
  left: 2px;
  bottom: -9px;
  width: 64px;
  height: 77px;
  clip-path: inset(0px 0px 9px 0px);
}

.time-spent-manga-2 > svg {
  left: -10px;
  bottom: -7px;
  width: 80px;
  height: 80px;
  clip-path: inset(0px 0px 7px 0px);
}

.time-spent-manga-3 > svg {
  left: -5px;
  bottom: -4px;
  width: 78px;
  height: 70px;
  clip-path: inset(0px 0px 4px 0px);
}

.time-spent-manga-4 > svg {
  left: -5px;
  bottom: -5px;
  width: 80px;
  height: 75px;
  clip-path: inset(0px 0px 5px 0px);
}

.time-spent-text {
  margin-left: 55px;
}

.time-spent-primary {
  font-weight: bold;
  font-size: 13px;
}

.time-spent-secondary {
  color: $body-secondary-text-color;
  font-weight: 500;
  font-size: 11px;
}

.time-spent-percentile {
  font-weight: bold;
  color: $input-text-color;
}

.time-spent-info {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 20px;
  height: 20px;
  svg {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    opacity: 0.5;
  }
}

.time-spent-info.active > svg {
  opacity: 1.0;
}

.time-spent-breakdown {
  display: flex;
  align-items: flex-start;
}