Browse Source

Changes on .notification stylesheet

soyjavi 14 năm trước cách đây
mục cha
commit
55991a223c

+ 80 - 22
src/stylesheets/css/lungo.widgets.notification.css

@@ -1,3 +1,5 @@
+/* DIMENSIONS */
+/* COLORS */
 .notification {
   position: absolute;
   width: 100%;
@@ -8,6 +10,9 @@
   color: #ffffff;
   display: none;
 }
+.notification.modal {
+  background-color: rgba(0, 0, 0, 0.3);
+}
 .notification .window {
   position: relative;
   opacity: 0;
@@ -16,6 +21,11 @@
   -ms-transition: all 300ms cubic-bezier(0.39, 0.575, 0.565, 1);
   -o-transition: all 300ms cubic-bezier(0.39, 0.575, 0.565, 1);
   transition: all 300ms cubic-bezier(0.39, 0.575, 0.565, 1);
+  -webkit-transition: all 300ms cubic-bezier(0.39, 0.575, 0.565, 1);
+  -moz-transition: all 300ms cubic-bezier(0.39, 0.575, 0.565, 1);
+  -ms-transition: all 300ms cubic-bezier(0.39, 0.575, 0.565, 1);
+  -o-transition: all 300ms cubic-bezier(0.39, 0.575, 0.565, 1);
+  transition: all 300ms cubic-bezier(0.39, 0.575, 0.565, 1);
 }
 .notification .window.show {
   opacity: 1;
@@ -34,6 +44,17 @@
   -webkit-background-clip: padding-box;
   -moz-background-clip: padding;
   background-clip: padding-box;
+  -webkit-border-radius: 1px;
+  -moz-border-radius: 1px;
+  border-radius: 1px;
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding;
+  background-clip: padding-box;
+  -webkit-transform: scale(0.85);
+  -moz-transform: scale(0.85);
+  -ms-transform: scale(0.85);
+  -o-transform: scale(0.85);
+  transform: scale(0.85);
   -webkit-transform: scale(0.85);
   -moz-transform: scale(0.85);
   -ms-transform: scale(0.85);
@@ -46,12 +67,18 @@
   -ms-transform: translate3d(0, 0%, 0);
   -o-transform: translate3d(0, 0%, 0);
   transform: translate3d(0, 0%, 0);
+  -webkit-transform: translate3d(0, 0%, 0);
+  -moz-transform: translate3d(0, 0%, 0);
+  -ms-transform: translate3d(0, 0%, 0);
+  -o-transform: translate3d(0, 0%, 0);
+  transform: translate3d(0, 0%, 0);
 }
 .notification .window:not(.special) .icon {
   display: block;
   font-size: 5.0em;
 }
 .notification .window:not(.special) .icon.loading {
+  margin-top: 24px;
   margin-bottom: 24px;
 }
 .notification .window:not(.special) strong {
@@ -65,6 +92,11 @@
   -ms-transform: translate3d(0, -150%, 0);
   -o-transform: translate3d(0, -150%, 0);
   transform: translate3d(0, -150%, 0);
+  -webkit-transform: translate3d(0, -150%, 0);
+  -moz-transform: translate3d(0, -150%, 0);
+  -ms-transform: translate3d(0, -150%, 0);
+  -o-transform: translate3d(0, -150%, 0);
+  transform: translate3d(0, -150%, 0);
 }
 .notification .window.confirm.show,
 .notification .window.notify.show {
@@ -73,6 +105,11 @@
   -ms-transform: translate3d(0, 0%, 0);
   -o-transform: translate3d(0, 0%, 0);
   transform: translate3d(0, 0%, 0);
+  -webkit-transform: translate3d(0, 0%, 0);
+  -moz-transform: translate3d(0, 0%, 0);
+  -ms-transform: translate3d(0, 0%, 0);
+  -o-transform: translate3d(0, 0%, 0);
+  transform: translate3d(0, 0%, 0);
 }
 .notification .window.confirm .icon,
 .notification .window.notify .icon {
@@ -88,7 +125,7 @@
   opacity: 1;
   padding: 10px 12px;
   top: 0;
-  top: 43px;
+  top: 42px;
   background: #333;
 }
 .notification .window.confirm hr {
@@ -98,6 +135,9 @@
   -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
   -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
   box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
+  -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
+  -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
+  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
 }
 .notification .window.confirm .button {
   width: 42%;
@@ -112,11 +152,9 @@
   top: 0;
   color: #555555;
   text-shadow: 0 1px 0px #ffffff;
-  background-image: -webkit-linear-gradient(top , #e8e8e8 0% , #f6f6f6 50%);
-  background-image: -moz-linear-gradient(top , #e8e8e8 0% , #f6f6f6 50%);
-  background-image: -ms-linear-gradient(top , #e8e8e8 0% , #f6f6f6 50%);
-  background-image: -o-linear-gradient(top , #e8e8e8 0% , #f6f6f6 50%);
-  background-image: linear-gradient(top , #e8e8e8 0% , #f6f6f6 50%);
+  -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
+  -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
+  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
   -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
   -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
   box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
@@ -128,25 +166,40 @@
   text-shadow: 0 1px 0px rgba(0, 0, 0, 0.1);
 }
 .notification .window.notify.error {
-  background-image: -webkit-linear-gradient(top , #ff4444 0% , #cc0000 50%);
-  background-image: -moz-linear-gradient(top , #ff4444 0% , #cc0000 50%);
-  background-image: -ms-linear-gradient(top , #ff4444 0% , #cc0000 50%);
-  background-image: -o-linear-gradient(top , #ff4444 0% , #cc0000 50%);
-  background-image: linear-gradient(top , #ff4444 0% , #cc0000 50%);
+  background-image: -webkit-linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: -moz-linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: -ms-linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: -o-linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: -webkit-linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: -moz-linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: -ms-linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: -o-linear-gradient(top , #e33100 0% , #c5280f 85%);
+  background-image: linear-gradient(top , #e33100 0% , #c5280f 85%);
 }
 .notification .window.notify.alert {
-  background-image: -webkit-linear-gradient(top , #ffbb33 0% , #ff8800 50%);
-  background-image: -moz-linear-gradient(top , #ffbb33 0% , #ff8800 50%);
-  background-image: -ms-linear-gradient(top , #ffbb33 0% , #ff8800 50%);
-  background-image: -o-linear-gradient(top , #ffbb33 0% , #ff8800 50%);
-  background-image: linear-gradient(top , #ffbb33 0% , #ff8800 50%);
+  background-image: -webkit-linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: -moz-linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: -ms-linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: -o-linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: -webkit-linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: -moz-linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: -ms-linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: -o-linear-gradient(top , #ffb515 0% , #dfa020 85%);
+  background-image: linear-gradient(top , #ffb515 0% , #dfa020 85%);
 }
 .notification .window.notify.success {
-  background-image: -webkit-linear-gradient(top , #99cc00 0% , #669900 50%);
-  background-image: -moz-linear-gradient(top , #99cc00 0% , #669900 50%);
-  background-image: -ms-linear-gradient(top , #99cc00 0% , #669900 50%);
-  background-image: -o-linear-gradient(top , #99cc00 0% , #669900 50%);
-  background-image: linear-gradient(top , #99cc00 0% , #669900 50%);
+  background-image: -webkit-linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: -moz-linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: -ms-linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: -o-linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: -webkit-linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: -moz-linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: -ms-linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: -o-linear-gradient(top , #009600 0% , #00770e 85%);
+  background-image: linear-gradient(top , #009600 0% , #00770e 85%);
 }
 .notification .window.url {
   left: 0%;
@@ -160,12 +213,17 @@
   -ms-transform: translate3d(0, 75%, 0);
   -o-transform: translate3d(0, 75%, 0);
   transform: translate3d(0, 75%, 0);
+  -webkit-transform: translate3d(0, 75%, 0);
+  -moz-transform: translate3d(0, 75%, 0);
+  -ms-transform: translate3d(0, 75%, 0);
+  -o-transform: translate3d(0, 75%, 0);
+  transform: translate3d(0, 75%, 0);
 }
 .notification .window.url .close {
   position: absolute;
   top: -14px;
   right: -14px;
-  font-size: 16px;
+  font-size: 14px;
   line-height: 24px;
   font-weight: normal;
   width: 24px;

+ 11 - 13
src/stylesheets/lungo.widgets.notification.less

@@ -1,6 +1,7 @@
 @import "mixins.less";
+@import "constants.less";
 
-@notification_opacity: rgba(0,0,0,0.5);
+@notification_opacity: rgba(0,0,0,0.3);
 @defaultTrasition : @easeOutSine;
 @keyframe: 300ms;
 
@@ -24,15 +25,14 @@
     color: @font_color;
     display: none;
 
-    &.modal {
-        // background-color: @notification_opacity;
-    }
+    &.modal { background-color: @notification_opacity; }
 
     & .window {
         position: relative;
         opacity: 0;
 
         //transition-property: -webkit-transform, transform, opacity;
+        // @TODO: Correct vendor property;
         .transition(all @keyframe @defaultTrasition);
 
         &.show {
@@ -51,8 +51,6 @@
 
             .border-radius(@modal_border_radius);
             // .transform(translate3d(0, 100%, 0));
-
-
             .transform(scale(0.85));
 
             &.show {
@@ -63,6 +61,8 @@
                 display: block;
                 font-size: 5.0em;
                 &.loading {
+                    // margin: 24px auto;
+                    margin-top: 24px;
                     margin-bottom: 24px;
                 }
             }
@@ -92,7 +92,7 @@
             opacity: 1;
             padding: 10px 12px;
             top: 0;
-            top: 43px;
+            top: 42px;
             background: #333;
 
             & hr {
@@ -116,17 +116,15 @@
             color: @notify_font_color;
             text-shadow: @notify_font_shadow;
 
-            .linear-gradient(top, ~','#e8e8e8 0%, ~','#f6f6f6 50%);
-
             .box-shadow(0px 1px 3px rgba(0,0,0,0.5));
 
             &.error, &.alert, &.success {
                 color: @font_color;
                 text-shadow: 0 1px 0px rgba(0,0,0,0.1);
             }
-            &.error { .linear-gradient(top, ~','#FF4444 0%, ~','#CC0000 50%); }
-            &.alert { .linear-gradient(top, ~','#FFBB33 0%, ~','#FF8800 50%); }
-            &.success { .linear-gradient(top, ~','#99CC00 0%, ~','#669900 50%); }
+            &.error { .linear-gradient(top, ~','@red 0%, ~','@red-active 85%); }
+            &.alert { .linear-gradient(top, ~','@yellow 0%, ~','@yellow-active 85%); }
+            &.success { .linear-gradient(top, ~','@green 0%, ~','@green-active 85%); }
         }
 
         &.url {
@@ -143,7 +141,7 @@
                 top: -14px;
                 right: -14px;
 
-                font-size: 16px;
+                font-size: 14px;
                 line-height: 24px;
                 font-weight: normal;
                 width: 24px;