hummingbird-me/hummingbird

View on GitHub
public/2015/assets/css/year.css

Summary

Maintainability
Test Coverage
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #272C32;
  font-family: "Open Sans";
  height: 100%;
  overflow: hidden;
  overflow-y: scroll;
}

section {
  width: 100%;
  height: 100vh;
  position: relative;
}

.landing .landing-text {
  width: 100%;
  color: #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}
.landing .year {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
      -ms-flex-direction: row;
          flex-direction: row;
  -webkit-flex-wrap: nowrap;
      -ms-flex-wrap: nowrap;
          flex-wrap: nowrap;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-align-content: center;
      -ms-flex-line-pack: center;
          align-content: center;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
      -ms-flex-align: start;
          align-items: flex-start;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 10px;
}
.landing .year img {
  width: 80px;
  height: 80px;
}
.landing .year img,
.landing .year div {
  -webkit-box-ordinal-group: 1;
  -webkit-order: 0;
      -ms-flex-order: 0;
          order: 0;
  -webkit-box-flex: 0;
  -webkit-flex: 0 1 auto;
      -ms-flex: 0 1 auto;
          flex: 0 1 auto;
  -webkit-align-self: auto;
      -ms-flex-item-align: auto;
          align-self: auto;
  line-height: 80px;
}
.landing .year div:first-of-type {
  padding-right: 0.7rem;
}
.landing .year div:last-of-type {
  padding-left: 0.2rem;
}
.landing .heading {
  text-align: center;
  font-size: 8rem;
  line-height: 8rem;
  word-wrap: break-word;
}
.landing .heading span {
  font-size: 0.91em;
}
@-webkit-keyframes bounce {
  to {
    -webkit-transform: translateY(-5px);
            transform: translateY(-5px);
  }
}
@keyframes bounce {
  to {
    -webkit-transform: translateY(-5px);
            transform: translateY(-5px);
  }
}
.landing .down {
  -webkit-animation: bounce 0.35s infinite alternate;
          animation: bounce 0.35s infinite alternate;
  width: 32px;
  height: 32px;
  bottom: 10vh;
  left: 50%;
  margin-left: -16px;
  position: absolute;
}
.landing .down:before, .landing .down:after {
  background: #fff;
  content: '';
  display: block;
  height: 45px;
  position: absolute;
  top: 0;
  width: 3px;
}
.landing .down:before {
  -webkit-transform: rotate(-45deg);
          transform: rotate(-45deg);
  left: 0;
}
.landing .down:after {
  -webkit-transform: rotate(45deg);
          transform: rotate(45deg);
  left: 30px;
}

.numbers p {
  font-size: 3rem;
  color: #fff;
  max-width: 40vw;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}
.numbers .big {
  font-size: 10rem;
  line-height: 11rem;
}
.numbers .highlight {
  font-weight: 700;
  color: #00A185;
}
.numbers a {
  text-decoration: none;
  color: #00A185;
  -webkit-transition: all 0.1s ease-in-out;
  transition: all 0.1s ease-in-out;
}
.numbers a:hover {
  color: #fff;
}

.anime {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-flex-wrap: nowrap;
      -ms-flex-wrap: nowrap;
          flex-wrap: nowrap;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-align-content: center;
      -ms-flex-line-pack: center;
          align-content: center;
  -webkit-box-align: baseline;
  -webkit-align-items: baseline;
      -ms-flex-align: baseline;
          align-items: baseline;
  overflow: hidden;
}

.overlay {
  height: 100%;
  width: 100%;
  background: #272C32;
  opacity: .6;
  position: absolute;
  z-index: 3;
  object-fit: cover;
}

.mobile {
  display: none;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
}

.left {
  width: 34rem;
  background: rgba(0, 161, 133, 0.8);
  color: #fff;
  margin: 4rem 0 0 6rem;
  padding: 2rem;
  z-index: 4;
  border-radius: 4px;
}

.category {
  font-size: 1.5rem;
  line-height: 2rem;
}

.title {
  font-size: 3rem;
  line-height: 3rem;
  font-weight: 700;
  padding: 1rem 0;
}

.title,
.category {
  text-align: center;
}

.rating {
  font-size: 1rem;
  font-weight: 700;
  padding-bottom: 1rem;
}

.bottom {
  z-index: 6;
  margin: 0 0 4rem 6rem;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
}
.bottom a {
  text-decoration: none;
}
.bottom img {
  width: 6rem;
  border-radius: 4px;
}
.bottom .runner {
  position: relative;
  width: 6rem;
  margin-top: 1rem;
  margin-right: 1rem;
  flex: 0 1 auto;
  align-self: auto;
}
.bottom .runnerNumber {
  background: #272C32;
  width: 24px;
  height: 24px;
  border-radius: 15px;
  position: absolute;
  bottom: 114px;
  left: 10px;
  color: #fff;
  font-size: 0.8rem;
  text-align: center;
  line-height: 24px;
  font-weight: 700;
}

.runner:nth-of-type(1) { order: 10; }
.runner:nth-of-type(2) { order: 9; }
.runner:nth-of-type(3) { order: 8; }
.runner:nth-of-type(4) { order: 7; }
.runner:nth-of-type(5) { order: 6; }
.runner:nth-of-type(6) { order: 5; }
.runner:nth-of-type(7) { order: 4; }
.runner:nth-of-type(8) { order: 3; }
.runner:nth-of-type(9) { order: 2; }
.runner:nth-of-type(10) { order: 1; }

a[data-title]:hover:after {
  content: attr(data-title);
  padding: .5rem 1rem;
  color: #fff;
  background: #272C32;
  position: absolute;
  font-size: 1rem;
  left: 0;
  bottom: 150px;
  z-index: 20;
  white-space: nowrap;
  border-radius: 4px;
}

.social {
  position: absolute;
  left: 46%;
  bottom: 40px;
}

.fb-like {
  bottom: 5px;
}

@media only screen and (max-width: 1300px) and (min-width: 1151px) {
  a[data-title]:hover:after {
    bottom: 127px;
  }
  .bottom .runner,
  .bottom img {
    width: 5rem;
  }
  .bottom .runnerNumber {
    bottom: 92px;
    left: 7px;
  }
}
@media only screen and (max-width: 1150px) {
  a[data-title]:hover:after {
    bottom: 104px;
  }
  .bottom .runner,
  .bottom img {
    width: 4rem;
  }
  .bottom .runnerNumber {
    bottom: 71px;
    left: 6px;
  }
}
@media only screen and (min-width: 767px) and (max-width: 1486px) and (min-height: 738px) {
  .big {
    font-size: 7rem !important;
    line-height: 8rem !important;
  }
}
@media only screen and (max-width: 938px) and (min-height: 738px) {
  .title {
    font-size: 2rem;
    line-height: 2rem;
  }

  .heading {
    font-size: 3rem !important;
    line-height: 4rem !important;
  }

  .numbers p {
    font-size: 1.5rem;
    max-width: 60vw;
  }

  .big {
    font-size: 4rem !important;
    line-height: 5rem !important;
  }

  .left {
    width: calc(100% - 4rem);
    margin: 2rem 2rem 0 2rem;
  }

  .synopsis {
    display: none;
  }

  .rating {
    text-align: center;
  }

  .bottom {
    margin: 2rem;
  }
}
@media only screen and (max-height: 737px) and (min-height: 416px) {
  .title {
    font-size: 2rem;
    line-height: 2rem;
  }

  .heading {
    font-size: 3rem !important;
    line-height: 4rem !important;
  }

  .numbers p {
    font-size: 1.5rem;
    max-width: 60vw;
  }

  .big {
    font-size: 4rem !important;
    line-height: 5rem !important;
  }

  .left {
    width: calc(100% - 2rem);
    margin: 1rem 1rem 0 1rem;
  }

  .synopsis {
    display: none;
  }

  .rating {
    text-align: center;
  }

  .bottom {
    margin: 1rem;
  }
}
@media only screen and (max-height: 415px) {
  .anime,
  .overlay {
    height: 120vh;
  }

  .title {
    font-size: 2rem;
    line-height: 2rem;
  }

  .heading {
    font-size: 3rem !important;
    line-height: 4rem !important;
  }

  .numbers p {
    font-size: 1.5rem;
    max-width: 60vw;
  }

  .big {
    font-size: 4rem !important;
    line-height: 5rem !important;
  }

  .left {
    width: calc(100% - 2rem);
    margin: 1rem 1rem 0 1rem;
  }

  .synopsis {
    display: none;
  }

  .rating {
    text-align: center;
  }

  .bottom {
    margin: 1rem;
  }
}
@media only screen and (max-width: 598px) and (max-height: 640px) {
  .anime,
  .overlay {
    height: 110vh;
  }
  .left {
    width: calc(100% - 2rem);
    margin: 1rem 1rem 0 1rem;
  }

  .bottom {
    margin: 1rem;
  }
}
@media only screen and (max-height: 335px) {
  .anime,
  .overlay {
    height: 130vh;
  }
}
@media only screen and (width: 360px) and (height: 640px) {
  .runner:nth-of-type(10) {
    display: none;
  }
}
@media only screen and (max-width: 800px) and (max-height: 1280px) {
  .desktop {
    display: none;
  }
  .mobile {
    display: block;
  }
}
@media only screen and (max-width: 1280px) and (max-height: 800px) {
  .desktop {
    display: none;
  }
  .mobile {
    display: block;
  }
}
/* iPhone 4 landscape fix */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px)
and (orientation : landscape)
and (device-aspect-ratio: 2/3) {
  .anime,
  .overlay {
    height: 142vh;
  }
}
/* iPhone 4 portrait fix */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px)
and (orientation : portrait) {
  .heading {
    font-size: 2rem !important;
    line-height: 2.5rem !important;
  }
  .anime,
  .overlay {
    height: 137vh;
  }
  .title {
    font-size: 1.5rem;
    line-height: 1.5rem;
  }
  .runner:nth-of-type(10) {
    display: none;
  }
  .big {
    font-size: 2rem !important;
    line-height: 3rem !important;
  }
  .bottom {
    justify-content: center;
  }
}
/* iPhone 5 landscape fix */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : landscape) {
  .anime,
  .overlay {
    height: 142vh;
  }
  .numbers {
    height: 120vh;
  }
  .title {
    font-size: 1.5rem;
    line-height: 1.5rem;
  }
  .bottom {
    justify-content: center;
  }
}
/* iPhone 5 portrait fix */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : portrait)
and (device-aspect-ratio: 40/71) {
  .heading {
    font-size: 2rem !important;
    line-height: 2.5rem !important;
  }
  .anime,
  .overlay {
    height: 116vh;
  }
  .runner:nth-of-type(10) {
    display: none;
  }
  .big {
    font-size: 2rem !important;
    line-height: 3rem !important;
  }
  .bottom {
    justify-content: center;
  }
}
/* iPhone 6 fixes */
@media only screen
and (min-device-width : 375px)
and (max-device-width : 736px)
and (orientation : landscape) {
  .runner:nth-of-type(10) {
    display: block;
  }
  .bottom {
    justify-content: center;
  }
}
@media only screen
and (min-device-width : 375px)
and (max-device-width : 736px)
and (orientation : portrait) {
  .anime,
  .overlay {
    height: 100vh;
  }
  .runner:nth-of-type(10) {
    display: block;
  }
  .bottom {
    justify-content: center;
  }
}