lungo.widget.notification.styl 2.2 KB

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