HabitatMap/AirCasting

View on GitHub
app/assets/stylesheets/modules/single-session.scss

Summary

Maintainability
Test Coverage
.single-session-container {
  @include flexbox();
  @include flex-direction(row);
  background-color: white;
  border-radius: $basic-radius;
  box-shadow: $lighter-shadow;
  margin: 0 auto $margin-default auto;
  overflow: hidden;
  padding: 16px;
  position: relative;
  width: 95%;

  @media screen and (max-width: $tablet-max) {
    @include flex-direction(column);
    border-radius: 0;
    box-shadow: 0px -12px 12px $shadow-color-delicate;
    margin-bottom: -$margin-default; // removes space needed in session list to show Google attribution
    width: 100%;
  }

  @media screen and (max-width: $large-mobile-max) {
    padding: 10px 10px 0;
  }
}

.single-session__aside {
  display: flex;
  padding-right: 16px;

  @media screen and (max-width: $tablet-max) {
    @include flex-direction(row);
    margin-bottom: 5px;
    padding-right: 0;
    z-index: 1;

    .action-buttons {
      display: none;
    }
  }
}

.single-session__graph {
  flex: 1;
  height: 226px;

  @media screen and (max-width: $tablet-max) {
    margin: 0 -4px -10px;
  }
}

.single-session__info {
  @include flexbox();
  flex-direction: column;
  justify-content: space-between;
  width: 215px;

  @media screen and (max-width: $tablet-max) {
    width: 100%;
  }
}

.session-data {
  @media screen and (max-width: $tablet-max) {
    display: flex;
  }
}

.session-data__left,
.session-data__right {
  @media screen and (max-width: $tablet-max) {
    flex: 1 0 160px;
  }
}

.session-data__left {
  @media screen and (max-width: $tablet-max) {
    padding-right: 5px;
  }
}

.session-data__right {
  @media screen and (max-width: $tablet-max) {
    padding-left: 5px;
  }

  @media screen and (min-width: $small-desktop-min) {
    line-height: 1.6;
  }
}

.single-session__name {
  display: -webkit-box;
  /*! autoprefixer: ignore next */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: $medium-font;
  max-height: 3em; // for browsers that don't support clamp, including Firefox <= 67 - still trims but with no ellipsis (...)
  overflow: hidden;
  word-break: break-word;

  @media screen and (max-width: $tablet-max) {
    line-height: 1.3;
  }
}

.single-session__username {
  font-size: $small-font;
}

.single-session__max {
  font-size: $tiny-font;
}

.single-session__avg {
  font-size: $medium-font;
}

.single-session__sensor {
  font-size: $tiny-font;
  margin-bottom: 16px;

  @media screen and (max-width: $tablet-max) {
    margin-bottom: 0;
  }
}

.single-session__date {
  font-size: $tiny-font;

  @media screen and (min-width: $small-desktop-min) {
    line-height: 2;
  }
}

.session-numbers-container {
  @include flexbox();
  @include justify-content(flex-start);
  @include align-items(center);
}

.session-min-max-container {
  padding: 0 15px 0 0;
}

.single-session__color {
  display: inline-block;
  height: 6px;
  width: 6px;
  border-radius: 6px;
  margin-right: 5px;
}

.single-session__avg-color {
  display: inline-block;
  height: 9px;
  width: 9px;
  border-radius: 9px;
  margin-right: 5px;
}

.single-session__close-button {
  font-size: 32px;
  line-height: 1;
  position: absolute;
  right: 0;
  top: 5px;

  @media screen and (max-width: $tablet-max) {
    font-size: 42px;
    top: 0;
    z-index: 2;
  }
}

.single-session__placeholder {
  height: 57px;
}

.highcharts-scrollbar-thumb,
.highcharts-scrollbar-arrow,
.highcharts-scrollbar-button {
  cursor: pointer;
}