change-avatar.less 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. //
  2. // Change Avatar Modal
  3. // --------------------------------------------------
  4. // Index
  5. .modal-change-avatar .modal-avatar-index {
  6. .avatar-preview {
  7. border-radius: @border-radius-large;
  8. margin: 0px auto;
  9. overflow: hidden;
  10. position: relative;
  11. width: 200px;
  12. height: 200px;
  13. .loader {
  14. display: none;
  15. position: absolute;
  16. top: 50px;
  17. height: 100px;
  18. .loader-spinning-wheel {
  19. border-width: 10px;
  20. border-color: #fff;
  21. border-left-color: transparent;
  22. border-right-color: transparent;
  23. width: 100px;
  24. height: 100px;
  25. }
  26. }
  27. &.preview-loading {
  28. img {
  29. .opacity(0.33);
  30. }
  31. .loader {
  32. display: block;
  33. }
  34. }
  35. @media (max-width: (@grid-float-breakpoint - 1)) {
  36. margin-bottom: @line-height-computed;
  37. width: 150px;
  38. height: 150px;
  39. img {
  40. width: 150px;
  41. height: 150px;
  42. }
  43. .loader {
  44. top: 25px;
  45. height: 100px;
  46. .loader-spinning-wheel {
  47. width: 100px;
  48. height: 100px;
  49. }
  50. }
  51. }
  52. }
  53. .btn {
  54. text-align: left;
  55. }
  56. }
  57. // Upload
  58. .modal-change-avatar .modal-avatar-upload {
  59. text-align: center;
  60. .btn-pick-file {
  61. background: transparent;
  62. border: 2px solid @gray-lighter;
  63. border-radius: @border-radius-large;
  64. padding: @padding-large-vertical @padding-large-horizontal * 1.5;
  65. .box-shadow(none);
  66. color: @gray-light;
  67. font-size: @font-size-large;
  68. text-align: center;
  69. &>.material-icon {
  70. display: block;
  71. margin: 0px auto;
  72. margin-bottom: @line-height-computed * .66;
  73. font-size: @line-height-computed * 2.5;
  74. width: @line-height-computed * 2.5;
  75. height: @line-height-computed * 2.5;
  76. }
  77. &:hover, &:active {
  78. border-color: @brand-primary;
  79. color: @brand-primary;
  80. }
  81. }
  82. .text-muted {
  83. margin-top: @line-height-computed * 0.66;
  84. }
  85. .upload-progress {
  86. img {
  87. border-radius: @border-radius-base;
  88. margin-bottom: @line-height-computed;
  89. max-height: 80px;
  90. width: auto;
  91. }
  92. .progress {
  93. width: 70%;
  94. margin: 0px auto;
  95. }
  96. }
  97. }
  98. // Crop
  99. .modal-avatar-crop .crop-form {
  100. margin: 0px auto;
  101. .cropit-image-zoom-input {
  102. margin-top: @line-height-computed / 2;
  103. // removes default webkit styles
  104. -webkit-appearance: none;
  105. // fix for FF unable to apply focus style bug
  106. border: 1px solid white;
  107. // required for proper track sizing in FF
  108. width: 100%;
  109. &::-webkit-slider-runnable-track {
  110. width: 100%;
  111. height: 8px;
  112. background: @gray-lighter;
  113. border: none;
  114. border-radius: 3px;
  115. }
  116. &::-webkit-slider-thumb {
  117. -webkit-appearance: none;
  118. border: none;
  119. height: 20px;
  120. width: 20px;
  121. border-radius: 50%;
  122. background: @gray-light;
  123. margin-top: -6px;
  124. }
  125. &:focus {
  126. outline: none;
  127. }
  128. &:focus::-webkit-slider-runnable-track {
  129. background: @gray-lighter;
  130. }
  131. &::-moz-range-track {
  132. width: 100%;
  133. height: 8px;
  134. background: @gray-lighter;
  135. border: none;
  136. border-radius: 4px;
  137. }
  138. &::-moz-range-thumb {
  139. border: none;
  140. height: 20px;
  141. width: 20px;
  142. border-radius: 50%;
  143. background: @gray-light;
  144. }
  145. /*hide the outline behind the border*/
  146. &:-moz-focusring{
  147. outline: 1px solid white;
  148. outline-offset: -1px;
  149. }
  150. &::-ms-track {
  151. width: 100%;
  152. height: 8px;
  153. /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
  154. background: transparent;
  155. /*leave room for the larger thumb to overflow with a transparent border */
  156. border-color: transparent;
  157. border-width: 8px 0;
  158. /*remove default tick marks*/
  159. color: transparent;
  160. }
  161. &::-ms-fill-lower {
  162. background: @gray-lighter;
  163. border-radius: 16px;
  164. }
  165. &::-ms-fill-upper {
  166. background: @gray-lighter;
  167. border-radius: 16px;
  168. }
  169. &::-ms-thumb {
  170. border: none;
  171. height: 20px;
  172. width: 20px;
  173. border-radius: 50%;
  174. background: @gray-light;
  175. }
  176. &:focus::-ms-fill-lower {
  177. background: @gray-lighter;
  178. }
  179. &:focus::-ms-fill-upper {
  180. background: @gray-lighter;
  181. }
  182. }
  183. }
  184. // Gallery
  185. .modal-change-avatar .modal-avatar-gallery {
  186. padding-bottom: 0px;
  187. .avatars-gallery {
  188. margin-bottom: @line-height-computed;
  189. h3 {
  190. margin-top: 0px;
  191. }
  192. }
  193. .avatars-gallery-images {
  194. .row {
  195. margin-bottom: @line-height-computed / 2;
  196. }
  197. .btn {
  198. border-radius: @border-radius-base + 2px;
  199. border: 2px solid @gray-lighter;
  200. background: none;
  201. padding: 2px;
  202. position: relative;
  203. &:hover, &:focus {
  204. border-color: @gray-light;
  205. }
  206. &.avatar-selected, &:active {
  207. border-color: @link-color;
  208. }
  209. img {
  210. border-radius: @border-radius-base;
  211. width: 100%;
  212. height: auto;
  213. }
  214. }
  215. }
  216. }