I have a form that functions as a settings page. When form elements are modified, they are marked as unsaved
and have a different border color. When the form is saved, they are marked as saved by having another border color.
What I want is that when the form is saved, the border will gradually fade out.
The order will go:
<input type='text' class='unsaved' /> Not saved yet, border is yellow
<input type='text' class='saved' /> Saved, so the border is green
<input type='text' class='' /> Fade out if coming from class saved
If I can get a CSS3 transition to fire when the class saved
is removed, then it could fade out and everything would be hunky-dory. Currently, I have to manually animate it (using a plug-in, of course), but it looks choppy, and I would like to move the code to CSS3 so it will be smoother.
I only need this to work in Chrome and Firefox 4+, though others would be nice.
CSS:
Here's the associated CSS:
.unsaved {
border: 3px solid #FFA500;
padding: 0;
}
.saved {
border: 3px solid #0F0;
padding: 0;
}
I would like to work in the following transition (or something like it):
border-color: rgba(0,0,0,0);
-webkit-transition: border-color .25s ease-in;
-moz-transition: border-color .25s ease-in;
-o-transition: border-color .25s ease-in;
transition: border-color .25s ease-in;
Note:
Personally, I don't agree with this scheme of user interaction, but that's how our software lead wants it. Please don't suggest that I change the way it functions currently. Thanks!