lungo.widget.notification.styl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. &.push
  21. height: (HEADER_HEIGHT / 1.75)
  22. & .window
  23. position: relative
  24. opacity: 0
  25. transition (all TRANSITION_TIME)
  26. text-align: center
  27. &.show
  28. opacity: 1
  29. transition-delay(TRANSITION_TIME)
  30. & strong, small
  31. display: block
  32. &.growl
  33. left: 50%
  34. top: 50%
  35. width: LOADING
  36. height: LOADING
  37. margin: -(LOADING / 2) auto auto -(LOADING / 2)
  38. padding: 0 8px
  39. transform(scale(0.2))
  40. &.show
  41. transform(scale(1.0))
  42. & > .icon
  43. font-size: 4em
  44. line-height: LOADING
  45. & ~ strong
  46. position: relative
  47. top: -(LOADING / 4.5)
  48. height: 18px
  49. overflow: hidden
  50. & > .loading
  51. top: 26px
  52. display: block
  53. &:not(.growl)
  54. left: 0
  55. top: 0
  56. &:not(.push)
  57. width: WINDOW_WIDTH
  58. margin: (HEADER_HEIGHT / 2) auto 0
  59. transform(translateY(100%))
  60. &.push
  61. transform(translateY(-100%))
  62. text-align: left
  63. height: H = (HEADER_HEIGHT / 1.75)
  64. line-height: H
  65. padding: 0 8px
  66. & .icon
  67. font-size: FONT_SIZE_LARGE
  68. float: left
  69. display: inline
  70. margin-right: 6px
  71. &.show
  72. transform(translateY(0%))
  73. &.success, &.error, &.confirm
  74. padding-top: 16px
  75. & > .icon
  76. font-size: 5em
  77. line-height: 1.0em
  78. & > strong
  79. font-size: FONT_SIZE_BIG
  80. padding-top: 4px
  81. & small
  82. padding-top: 8px
  83. padding-bottom: 16px
  84. & > strong, & small
  85. padding-left: 16px
  86. padding-right: 16px
  87. &.html
  88. & .title
  89. height: HEADER_HEIGHT
  90. line-height: HEADER_HEIGHT
  91. font-size: FONT_SIZE_LARGE
  92. & button, & .button
  93. display: block
  94. margin-bottom: 1px
  95. height: 48px
  96. line-height: 48px
  97. border: none