lungo.widget.notification.styl 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo.Widgets
  5. * @class Notification
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. LOADING = 104px
  10. WINDOW_WIDTH = 280px
  11. .notification
  12. position: relative
  13. top: 0
  14. left: 0
  15. width: 100%
  16. height: 100%
  17. z-index: 1980
  18. display: none
  19. &.show
  20. display-box()
  21. box-align(center)
  22. box-pack(center)
  23. &.push
  24. height: (HEADER_HEIGHT / 1.75)
  25. & .window
  26. position: relative
  27. opacity: 0
  28. text-align: center
  29. transition-duration (TRANSITION_TIME / 2)
  30. transition-timing-function DEFAULT_TRANSITION
  31. backface-visibility hidden
  32. &.show
  33. opacity: 1
  34. &:not(.push)
  35. transition-property opacity, margin-top
  36. margin-top: 100%
  37. &.show
  38. margin-top: 0%
  39. &.growl
  40. & > *
  41. position: absolute
  42. &, & > *:not(.loading)
  43. width: LOADING
  44. text-align: center
  45. &, & > .icon
  46. height: LOADING !important
  47. & > .icon
  48. left: 0px
  49. top: 0px
  50. font-size: 52px
  51. line-height: LOADING
  52. & > strong
  53. height: 18px
  54. top: (LOADING - 20px)
  55. padding: 0 0.5em
  56. overflow: hidden
  57. & > small
  58. display: none
  59. & > .loading
  60. top: 28px
  61. &.success, &.error, &.confirm, &.html
  62. width: WINDOW_WIDTH
  63. margin-top: 100%
  64. &.success, &.error, &.confirm
  65. padding-top: 16px
  66. & > .icon
  67. font-size: 5em
  68. line-height: 1.0em
  69. & > strong
  70. font-size: FONT_SIZE_BIG
  71. padding-top: 4px
  72. & small
  73. padding-top: 8px
  74. padding-bottom: 16px
  75. & > strong, & small
  76. padding-left: 16px
  77. padding-right: 16px
  78. &.html .title
  79. height: HEADER_HEIGHT
  80. line-height: HEADER_HEIGHT
  81. font-size: FONT_SIZE_LARGE
  82. &.push
  83. position: absolute
  84. text-align: left
  85. height: H = (HEADER_HEIGHT / 1.75)
  86. line-height: H
  87. padding: 0 8px
  88. width: 100%
  89. transition-property opacity, top
  90. top: -(H)
  91. &.show
  92. top: 0px
  93. & .icon
  94. font-size: FONT_SIZE_LARGE
  95. float: left
  96. display: inline
  97. margin-right: 6px
  98. & button, & .button
  99. display: block
  100. margin-bottom: 1px
  101. height: 48px
  102. line-height: 48px
  103. border: none
  104. font-size: FONT_SIZE_LARGE
  105. & strong, small
  106. display: block