Bug 1184790 - Force notifications to have opacity:1 when hovered to make sure that we show a readable notification during the intro/exit animation of the notification if the user has their mouse in the area. r=mattn draft
authorJared Wein <jwein@mozilla.com>
Thu, 15 Sep 2016 17:02:38 -0400
changeset 414199 297583740b11bb846efd7fe2691876f10fe6d402
parent 414198 4b1afa9d2e99ff11f590c253e33f65ec49157ea8
child 531389 fdc77df90335a246e91a3dbc2cb6418f5ec39b50
push id29614
push userbmo:jaws@mozilla.com
push dateThu, 15 Sep 2016 21:02:56 +0000
reviewersmattn
bugs1184790
milestone51.0a1
Bug 1184790 - Force notifications to have opacity:1 when hovered to make sure that we show a readable notification during the intro/exit animation of the notification if the user has their mouse in the area. r=mattn MozReview-Commit-ID: DccStz4VXCQ
toolkit/themes/shared/alert-common.css
--- a/toolkit/themes/shared/alert-common.css
+++ b/toolkit/themes/shared/alert-common.css
@@ -21,16 +21,22 @@
 
 /* This is used if the close button is clicked
    before the animation has finished. */
 #alertBox[animate][closing] {
   animation-duration: .6s;
   animation-name: alert-closing-animation;
 }
 
+#alertBox[animate]:not([clicked]):not([closing]):hover {
+  /* !important is necessary because CSS animations have highest
+     importance in the cascade with exception to !important rules. */
+  opacity: 1 !important;
+}
+
 @keyframes alert-animation {
   from {
     opacity: 0;
   }
   5% {
     opacity: 1;
   }
   95% {