af83/chouette-core

View on GitHub
app/packs/stylesheets/components/_alerts.scss

Summary

Maintainability
Test Coverage
//----------//
//  Alerts  //
//----------//

.alert {
  margin: 0;
  border-radius: 0;
  border: none;

  &.mt-xs {
    margin-top: 10px;
  }
  &.mt-sm {
    margin-top: 15px;
  }
  &.mt-md {
    margin-top: 20px;
  }
  &.mt-lg {
    margin-top: 40px;
  }
  &.mb-xs {
    margin-bottom: 10px;
  }
  &.mb-sm {
    margin-bottom: 15px;
  }
  &.mb-md {
    margin-bottom: 20px;
  }
  &.mb-lg {
    margin-bottom: 40px;
  }
  &.state-update {
    font-size: 1.25em;

    .sticky & {
      position: fixed;
      left: 0;
      right: 0;
      top: 80px;
      z-index: 2002;
    }
  }
  span.fa {
    margin-right: 10px;
  }
  #main_nav + & {
    padding: 10px 50px;
  }
  #main_nav.sticky + & {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 2002;
  }
  .fa-lg + span {
    margin-left: 10px;
  }
  p a {
    border-color: inherit;

    &:hover {
      color: inherit;
      border-color: inherit;
    }
  }
  form,
  .simple_form {
    & {
      margin-bottom: 15px;
    }
  }
  &.alert-dismissible {
    padding-right: 70px;

    .close {
      font-size: 1em;
      text-shadow: none;
      top: 3px;
      opacity: 1;
      font-weight: 300;
    }
  }
  &.alert-success {
    background-color: $green;
    color: #fff;

    .close {
      color: darken($green, 5%);

      &:hover,
      &:focus {
        color: darken($green, 10%);
      }
    }
  }
  &.alert-danger {
    background-color: $red;
    color: #fff;

    .close {
      color: white;

      &:hover,
      &:focus {
        color: darken($red, 10%);
      }
    }
  }
}