SumOfUs/Champaign

View on GitHub
app/javascript/components/ExpressDonation/ExpressDonation.scss

Summary

Maintainability
Test Coverage
.ExpressDonation {
  position: relative;
  margin-bottom: 20px;
  label {
    cursor: pointer;
  }
  &__recurring-checkbox {
    text-align: left;
  }
}

.ExpressDonation__prompt,
.PaymentTypeSelection__prompt {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 3px;
}

.ExpressDonation__payment-methods,
.PaymentTypeSelection__payment-methods {
  padding: 8px;
  margin-bottom: 20px;
}

.ExpressDonation__single-item {
  .PaymentMethod {
    margin: 0 auto;
    font-weight: bold;
  }
}

.ExpressDonation__toggle {
  font-size: 14px;
  cursor: pointer;
  margin-top: 6px;
  display: block;
  margin-bottom: 8px;
  text-align: left;
}

.PaymentMethod {
  margin: 10px 0;
  font-size: 14px;
  label,
  input[type='radio'] {
    cursor: pointer;
    margin-top: 0;
    margin-right: 14px;
    position: relative;
    top: 0px;
    float: left;
    border: none;
    -webkit-appearance: none;
  }

  input[type='radio']::before {
    width: 15px;
    height: 15px;
    border-radius: 15px;
    top: -2px;
    left: -1px;
    position: relative;
    background-color: #d1d3d1;
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid white;
  }

  input[type='radio']:checked::before {
    width: 15px;
    height: 15px;
    border-radius: 15px;
    top: -2px;
    left: -1px;
    position: relative;
    background-color: #00c0cf;
    transition: all 0.2s;
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid white;
  }
}

html[dir=rtl] .PaymentMethod {
  label,
  input[type='radio'] {
    margin-left: 14px;
    margin-right: unset;
    float: right;
  }

  input[type='radio']::before {
    right: -1px;
    left: unset;
  }

  input[type='radio']:checked::before {
    right: -1px;
    left: unset;
  }
}

.PaymentMethod input {
  height: 14px;
  width: 14px;
  padding: 0;
}
.PaymentMethodWrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: start;
}
.PaymentMethodWrapper__icon {
  position: absolute;
  top: 15px;
  left: 19px;
  font-size: 22px;
  display: none;
}

.PaymentMethod__guidance {
  width: 100%;
  font-size: 12px;
  font-style: italic;
  line-height: 17px;
  margin: 20px 0;
}

.PaymentExpressDonationConflict {
  &--accept,
  &--decline {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  }
}