material icon indicating copy to clipboard operation
material copied to clipboard

Pulsating theme colour(s) for md-fab buttons (and buttons in general)

Open pmoelgaard opened this issue 10 years ago • 2 comments

I want to achieve a pulsating effect on an md-fab-themed button, is this someone has done already ? It seems to must be a requirement someone else has come across... if not, I would love to get cracking making a proposal (or a quick'n'dirty) for it... anyone ?

pmoelgaard avatar Feb 29 '16 12:02 pmoelgaard

Is this what you're looking for? It animates the box-shadow color transition so that when you assign pulseGlow as a class, it looks like the object has a pulsing glow.

.pulseGlow {
    -webkit-animation-name: redPulse;
    -webkit-animation-duration: 2.5s;
    -webkit-animation-iteration-count: infinite;
}
@-webkit-keyframes redPulse {
    from { background-color: #fff; -webkit-box-shadow: 0 0 0 #333; }
    50% { background-color: #f00; -webkit-box-shadow: 0 0 16px #f00; }
    to { background-color: #fff; -webkit-box-shadow: 0 0 0 #333; }
}

source: http://zurb.com/playground/radioactive-buttons

BayanBennett avatar Mar 01 '16 20:03 BayanBennett

@BayanBennett OK, I suppose it might be overkill to include in the theme since the base cases wouldn't need it. Thank you for sharing your solution, much appreciated !

pmoelgaard avatar Mar 02 '16 06:03 pmoelgaard