Skip to content

Instantly share code, notes, and snippets.

@Igosuki
Created July 17, 2014 11:26
Show Gist options
  • Save Igosuki/a129560279e987d0aba0 to your computer and use it in GitHub Desktop.
Save Igosuki/a129560279e987d0aba0 to your computer and use it in GitHub Desktop.
Make bootstrap buttons radioactive
$colors: (primary: $brand-primary, success: $brand-success, info: $brand-info, warning: $brand-warning, danger: $brand-danger);
$radioactive-shadow: #333 !default;
$ratioactive-shadow-base: 0 0 9px;
$ratioactive-shadow-extended: 0 0 18px;
@each $color-name, $color in $colors {
$animation-name: $color-name;
@-webkit-keyframes #{$animation-name} {
from { background-color: $color; -webkit-box-shadow: $ratioactive-shadow-base $radioactive-shadow; }
50% { background-color: lighten($color, 15); -webkit-box-shadow: $ratioactive-shadow-extended lighten($color, 15); }
to { background-color: $color; -webkit-box-shadow: $ratioactive-shadow-base $radioactive-shadow; }
}
.btn.rad-#{$animation-name} {
@include animation($animation-name 2s infinite);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment