Index: public/stylesheets/application.css =================================================================== --- public/stylesheets/application.css (revision 17769) +++ public/stylesheets/application.css (working copy) @@ -876,9 +876,13 @@ font-size: 1.1em; border: 1px solid; border-radius: 3px; + } -div.flash {margin-top: 8px;} +div.flash { + margin-top: 8px; + animation: slideFlash 3s ease-in-out forwards; +} div.flash.error, #errorExplanation { background: url(../images/exclamation.png) 8px 50% no-repeat; @@ -885,6 +889,7 @@ background-color: #ffe3e3; border-color: #d88; color: #880000; + } div.flash.notice { @@ -1523,3 +1528,39 @@ max-height: 100%; max-width: 100%; } + +/***** Animations section *****/ +@keyframes slideFlash { + 0% { + background-size: 0; + font-size: 0; + padding: 0; + border-style: none; + display: none; + height: 0; + margin:0; + } + 10% { + background-size: 16px; + font-size: 1em; + border-style: solid; + padding: 6px 4px 6px 30px; + height: auto; + } + 90% { + background-size: 16px; + font-size: 1em; + border-style: solid; + padding: 6px 4px 6px 30px; + height: auto; + } + 100% { + background-size: 0; + font-size: 0; + padding: 0; + border-style: none; + display: none; + height: 0; + margin:0; + } +}