lungo.widget.notification.styl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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-property opacity, margin-top
  31. transition-duration TRANSITION_TIME
  32. transition-timing-function DEFAULT_TRANSITION
  33. backface-visibility hidden
  34. &.show
  35. opacity: 1
  36. margin-top: 0% !important
  37. &:not(.push)
  38. margin-top: 100%
  39. &.growl
  40. width: LOADING
  41. height: LOADING
  42. padding: 0 8px
  43. margin-top: 100%
  44. &.show
  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. padding-top: 16px
  58. width: WINDOW_WIDTH
  59. & > .icon
  60. font-size: 5em
  61. line-height: 1.0em
  62. & > strong
  63. font-size: FONT_SIZE_BIG
  64. padding-top: 4px
  65. & small
  66. padding-top: 8px
  67. padding-bottom: 16px
  68. & > strong, & small
  69. padding-left: 16px
  70. padding-right: 16px
  71. &.html .title
  72. height: HEADER_HEIGHT
  73. line-height: HEADER_HEIGHT
  74. font-size: FONT_SIZE_LARGE
  75. &.push
  76. position: absolute
  77. text-align: left
  78. height: H = (HEADER_HEIGHT / 1.75)
  79. line-height: H
  80. padding: 0 8px
  81. width: 100%
  82. margin-top: -(H)
  83. & .icon
  84. font-size: FONT_SIZE_LARGE
  85. float: left
  86. display: inline
  87. margin-right: 6px
  88. & button, & .button
  89. display: block
  90. margin-bottom: 1px
  91. height: 48px
  92. line-height: 48px
  93. border: none
  94. font-size: FONT_SIZE_LARGE
  95. & strong, small
  96. display: block