moonleerecords/moonlee-website

View on GitHub
app/assets/stylesheets/components/newsletter.scss

Summary

Maintainability
Test Coverage
.page-section {
  &.newsletter {
    background-color: $color-gorse;
    padding: 4% 50px;
  }
}

.newsletter-form {
  opacity: 1;
  position: relative;
  width: 100%;

  .section-title {
    margin: 12px 0;
    padding: 0;
    font-size: 53px;
  }

  div {
    position: relative;
    -moz-transition: opacity .5s;
    -o-transition: opacity .5s;
    -webkit-transition: opacity .5s;
    transition: opacity .5s;
    vertical-align: middle;
    z-index: 5;

    &.hidden {
      opacity: 0;
      z-index: -1;
    }
  }

  input {
    background-color: $color-limed-spruce;
    border: 0;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: $color-white;
    font-size: 26px;
    font-weight: lighter;
    margin: 10px 0;
    padding: 18px 30px;
    width: 100%;

    &.button-subscribe {
      padding: 14px 15px;
      width: 100%;
    }

    &:focus {
      outline: none;
    }

    &:-webkit-autofill {
      -webkit-box-shadow: 0 0 0px 1000px $color-limed-spruce inset;
      -webkit-text-fill-color: $color-white;
    }
  }

  .validation-message {
    color: $color-error-red;
    display: block;
    opacity: 0;
    padding-left: 30px;
    position: absolute;
    -moz-transition: opacity 1.5s;
    -o-transition: opacity 1.5s;
    -webkit-transition: opacity 1.5s;
    transition: opacity 1.5s;
    width: 100%;
    z-index: 5;

    &.success-message {
      @include vertical-align(24px);
      font-size: 20px;
      left: 0;
      margin: 20px 0 0;
      padding: 0;
      position: absolute;
      text-align: center;
      z-index: -1;
    }

    &.active {
      opacity: 1;
      z-index: 5;
    }
  }
}

@include respond-to(small) {
  .item-column {
    margin: 0;
  }
}

@include respond-to(medium) {
  .newsletter-form {
    .title-group {
      margin: 0;
      width: 100%;
    }

    .email-group {
      margin-left: 0;
    }

    .email-group,
    .country-group,
    .button-group {
      width: 32.13%;
    }
  }
}

@include respond-to(large) {
  .newsletter-form {
    .title-group {
      margin: 0 0 0 1.8%;
      width: 23.65%;
    }

    .email-group {
      margin: 0 0 0 1.8%;
      width: 32.13%;
    }

    .country-group {
      width: 23.65%;
    }

    .button-group {
      width: 15.16%;
    }
  }
}