Sha256: d03f1f6c04a3fe89c079ad5a32cc9e227c2d9a68acadbd83c6dc65fa7b7c235d

Contents?: true

Size: 1.92 KB

Versions: 34

Compression:

Stored size: 1.92 KB

Contents

// =============================================================================
// Notify
// =============================================================================

// Notifies the user with success messages or errors in the right bottom of the
// page.

// Settings
// =============================================================================

// Scaffolding notifications with a given color.
// @param {Hex} $color color background and font.

@mixin notification-generator($color) {
  color: $color;
  background-color: rgba(lighten($color, 55), .8);
  .close {
    color: rgba($color, .3);
    &:hover {
      color: rgba($color, .6);
    }
  }
  [data-notify="icon"] {
    color: $color;
  }
}

// Components
// =============================================================================

[data-notify="container"] {
  position: relative;
  width: 100%;
  max-width: 350px;
  font-size: 0;
  border: 0;
  box-shadow: 0 1px 10px rgba($black, .2);
  animation: fade-left .5s ease-out;
  .close {
    position: absolute;
    top: 50%;
    right: 15px;
    padding: 0;
    margin-top: -12px;
    font-size: 24px;
    line-height: 1;
    background: none;
    border: 0;
    &:focus,
    &:active {
      outline: none;
    }
  }
}

[data-notify="icon"] {
  display: inline-block;
  width: 15%;
  margin-left: -7.5px;
  font-size: 18px;
  text-align: center;
  vertical-align: middle;
}

[data-notify="message"] {
  display: inline-block;
  width: 85%;
  padding-right: 5%;
  font-size: $font-size-base;
  vertical-align: middle;
}

// Descendants
// =============================================================================

[data-notify="container"].alert-danger,
[data-notify="container"].alert-error {
  @include notification-generator($brand-danger);
}

[data-notify="container"].alert-success {
  @include notification-generator($brand-success);
}

[data-notify="container"].alert-warning {
  @include notification-generator($brand-warning);
}

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.2.0.alpha1 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.1.1 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.1.0 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.1.0.rc1 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.0.3 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.0.2 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.0.1 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.0.0 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.0.0.rc0 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.0.0.alpha3 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-3.4.1 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.0.0.alpha2 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-4.0.0.alpha1 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-3.4.0 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-3.3.0 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-3.3.0.rc3 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-3.3.0.rc2 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-3.1.2 app/assets/stylesheets/locomotive/new/_notify.scss
locomotivecms-3.2.1 app/assets/stylesheets/locomotive/new/_notify.scss