af83/edwig-admin

View on GitHub
app/assets/stylesheets/components/_alerts.sass

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

  #main_nav + &
    padding: 10px 50px

  .fa + 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: darken($red, 5%)

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