|
| 1 | +@notificationPrefixCls: notification; |
| 2 | +@notificationMotionDuration: 0.3s; |
| 3 | +@notificationMotionEase: cubic-bezier(0.22, 1, 0.36, 1); |
| 4 | +@notificationMotionOffset: 64px; |
| 5 | + |
| 6 | +.@{notificationPrefixCls} { |
| 7 | + &-list { |
| 8 | + position: fixed; |
| 9 | + top: 0; |
| 10 | + right: 0; |
| 11 | + z-index: 1000; |
| 12 | + width: 360px; |
| 13 | + max-height: 100vh; |
| 14 | + padding: 24px; |
| 15 | + box-sizing: border-box; |
| 16 | + display: flex; |
| 17 | + flex-direction: column; |
| 18 | + pointer-events: none; |
| 19 | + overflow-y: auto; |
| 20 | + overflow-x: hidden; |
| 21 | + } |
| 22 | + |
| 23 | + &-notice { |
| 24 | + pointer-events: auto; |
| 25 | + box-sizing: border-box; |
| 26 | + width: 100%; |
| 27 | + padding: 14px 16px; |
| 28 | + border: 2px solid #111; |
| 29 | + border-radius: 14px; |
| 30 | + background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%); |
| 31 | + box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.16); |
| 32 | + color: #111; |
| 33 | + font-size: 14px; |
| 34 | + line-height: 1.5; |
| 35 | + } |
| 36 | +} |
| 37 | + |
| 38 | +.notification-fade { |
| 39 | + backface-visibility: hidden; |
| 40 | + will-change: transform, opacity; |
| 41 | +} |
| 42 | + |
| 43 | +.notification-fade-appear-prepare, |
| 44 | +.notification-fade-enter-prepare { |
| 45 | + opacity: 0; |
| 46 | + transform: translate3d(@notificationMotionOffset, 0, 0); |
| 47 | +} |
| 48 | + |
| 49 | +.notification-fade-appear-start, |
| 50 | +.notification-fade-enter-start { |
| 51 | + opacity: 0; |
| 52 | + transform: translate3d(@notificationMotionOffset, 0, 0); |
| 53 | +} |
| 54 | + |
| 55 | +.notification-fade-appear-active, |
| 56 | +.notification-fade-enter-active { |
| 57 | + opacity: 1; |
| 58 | + transform: translate3d(0, 0, 0); |
| 59 | + transition: |
| 60 | + transform @notificationMotionDuration @notificationMotionEase, |
| 61 | + opacity @notificationMotionDuration @notificationMotionEase, |
| 62 | + height @notificationMotionDuration @notificationMotionEase, |
| 63 | + margin @notificationMotionDuration @notificationMotionEase; |
| 64 | +} |
| 65 | + |
| 66 | +.notification-fade-leave-start { |
| 67 | + opacity: 1; |
| 68 | + transform: translate3d(0, 0, 0); |
| 69 | +} |
| 70 | + |
| 71 | +.notification-fade-leave-active { |
| 72 | + opacity: 0; |
| 73 | + transform: translate3d(@notificationMotionOffset, 0, 0); |
| 74 | + transition: |
| 75 | + transform @notificationMotionDuration @notificationMotionEase, |
| 76 | + opacity @notificationMotionDuration @notificationMotionEase, |
| 77 | + height @notificationMotionDuration @notificationMotionEase, |
| 78 | + margin @notificationMotionDuration @notificationMotionEase; |
| 79 | +} |
0 commit comments