dropzone.styl 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /* The MIT License */
  2. // Copyright (c) 2012 Matias Meno <m@tias.me>
  3. // Permission is hereby granted, free of charge, to any person obtaining a copy of
  4. // this software and associated documentation files (the "Software"), to deal in
  5. // the Software without restriction, including without limitation the rights to
  6. // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  7. // of the Software, and to permit persons to whom the Software is furnished to do
  8. // so, subject to the following conditions:
  9. // The above copyright notice and this permission notice shall be included in all
  10. // copies or substantial portions of the Software.
  11. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  17. // SOFTWARE.
  18. @import "nib"
  19. @import "basic"
  20. @keyframes loading
  21. from
  22. background-position: 0 -400px
  23. to
  24. background-position: -7px -400px
  25. .dropzone
  26. border 1px solid rgba(0, 0, 0, 0.03)
  27. min-height 360px
  28. border-radius 3px
  29. background rgba(0, 0, 0, 0.03)
  30. padding 23px
  31. .dz-default.dz-message
  32. opacity 1
  33. transition opacity 0.3s ease-in-out
  34. image "../images/spritemap.png" 428px 406px
  35. background-repeat no-repeat
  36. background-position 0 0
  37. position absolute
  38. width 428px
  39. height 123px
  40. margin-left -(@width / 2)
  41. margin-top -(@height / 2)
  42. top 50%
  43. left 50%
  44. span
  45. display none
  46. &.dz-square
  47. .dz-default.dz-message
  48. background-position 0 -123px
  49. width 268px
  50. margin-left -(@width / 2)
  51. height 174px
  52. margin-top -(@height / 2)
  53. &.dz-drag-hover
  54. .dz-message
  55. opacity 0.15
  56. &.dz-started
  57. .dz-message
  58. display block
  59. opacity 0 // Rather fade out nicely
  60. .dropzone
  61. .dropzone-previews
  62. .dz-preview
  63. box-shadow 1px 1px 4px rgba(0, 0, 0, 0.16)
  64. font-size 14px
  65. .dz-details
  66. // Not implemented yet. This is the CSS definition of the file
  67. // content as text.
  68. // .content
  69. // font-size 3px
  70. // white-space pre
  71. // position absolute
  72. // top 5px
  73. // left 12px
  74. // right 19px
  75. // bottom 5px
  76. // overflow hidden
  77. // line-height 100%
  78. // cursor default
  79. // word-wrap break-word
  80. &.dz-image-preview
  81. &:hover
  82. .dz-details
  83. img
  84. display block
  85. opacity 0.1
  86. &.dz-success
  87. .dz-success-mark
  88. opacity 1
  89. &.dz-error
  90. .dz-error-mark
  91. opacity 1
  92. .dz-progress .dz-upload
  93. background #EE1E2D
  94. .dz-error-mark
  95. .dz-success-mark
  96. display block
  97. opacity 0 // Fade in / out
  98. transition opacity 0.4s ease-in-out
  99. image "../images/spritemap.png" 428px 406px
  100. background-repeat no-repeat
  101. span
  102. display none
  103. .dz-error-mark
  104. background-position -268px -123px
  105. .dz-success-mark
  106. background-position -268px -163px
  107. .dz-progress
  108. .dz-upload
  109. animation loading 0.4s linear infinite
  110. transition width 0.3s ease-in-out
  111. border-radius 2px
  112. position absolute
  113. top 0
  114. left 0
  115. width 0%
  116. height 100%
  117. image "../images/spritemap.png" 428px 406px
  118. background-repeat repeat-x
  119. background-position 0px -400px
  120. &.dz-success
  121. .dz-progress
  122. display block
  123. opacity 0
  124. transition opacity 0.4s ease-in-out
  125. // Disabled for now until I find a better way to cope with long filenames
  126. // .filename
  127. // span
  128. // overflow ellipsis
  129. .dz-error-message
  130. display block
  131. opacity 0 // Rather fade in / out
  132. transition opacity 0.3s ease-in-out
  133. &:hover.dz-error
  134. .dz-error-message
  135. opacity 1
  136. a.dz-remove
  137. background-image linear-gradient(top, #fafafa, #eee)
  138. border-radius 2px
  139. border 1px solid #eee
  140. text-decoration none
  141. display block
  142. padding 4px 5px
  143. text-align center
  144. color #aaa
  145. margin-top 26px
  146. &:hover
  147. color #666