croppie.css 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. .croppie-container {
  2. width: 100%;
  3. height: 100%;
  4. }
  5. .croppie-container .cr-image {
  6. z-index: -1;
  7. position: absolute;
  8. top: 0;
  9. left: 0;
  10. transform-origin: 0 0;
  11. max-height: none;
  12. max-width: none;
  13. }
  14. .croppie-container .cr-boundary {
  15. position: relative;
  16. overflow: hidden;
  17. margin: 0 auto;
  18. z-index: 1;
  19. width: 100%;
  20. height: 100%;
  21. }
  22. .croppie-container .cr-viewport,
  23. .croppie-container .cr-resizer {
  24. position: absolute;
  25. border: 2px solid #fff;
  26. margin: auto;
  27. top: 0;
  28. bottom: 0;
  29. right: 0;
  30. left: 0;
  31. box-shadow: 0 0 2000px 2000px rgba(0, 0, 0, 0.5);
  32. z-index: 0;
  33. }
  34. .croppie-container .cr-resizer {
  35. z-index: 2;
  36. box-shadow: none;
  37. pointer-events: none;
  38. }
  39. .croppie-container .cr-resizer-vertical,
  40. .croppie-container .cr-resizer-horisontal {
  41. position: absolute;
  42. pointer-events: all;
  43. }
  44. .croppie-container .cr-resizer-vertical::after,
  45. .croppie-container .cr-resizer-horisontal::after {
  46. display: block;
  47. position: absolute;
  48. box-sizing: border-box;
  49. border: 1px solid black;
  50. background: #fff;
  51. width: 10px;
  52. height: 10px;
  53. content: '';
  54. }
  55. .croppie-container .cr-resizer-vertical {
  56. bottom: -5px;
  57. cursor: row-resize;
  58. width: 100%;
  59. height: 10px;
  60. }
  61. .croppie-container .cr-resizer-vertical::after {
  62. left: 50%;
  63. margin-left: -5px;
  64. }
  65. .croppie-container .cr-resizer-horisontal {
  66. right: -5px;
  67. cursor: col-resize;
  68. width: 10px;
  69. height: 100%;
  70. }
  71. .croppie-container .cr-resizer-horisontal::after {
  72. top: 50%;
  73. margin-top: -5px;
  74. }
  75. .croppie-container .cr-original-image {
  76. display: none;
  77. }
  78. .croppie-container .cr-vp-circle {
  79. border-radius: 50%;
  80. }
  81. .croppie-container .cr-overlay {
  82. z-index: 1;
  83. position: absolute;
  84. cursor: move;
  85. touch-action: none;
  86. }
  87. .croppie-container .cr-slider-wrap {
  88. width: 75%;
  89. margin: 15px auto;
  90. text-align: center;
  91. }
  92. .croppie-result {
  93. position: relative;
  94. overflow: hidden;
  95. }
  96. .croppie-result img {
  97. position: absolute;
  98. }
  99. .croppie-container .cr-image,
  100. .croppie-container .cr-overlay,
  101. .croppie-container .cr-viewport {
  102. -webkit-transform: translateZ(0);
  103. -moz-transform: translateZ(0);
  104. -ms-transform: translateZ(0);
  105. transform: translateZ(0);
  106. }
  107. /*************************************/
  108. /***** STYLING RANGE INPUT ***********/
  109. /*************************************/
  110. /*http://brennaobrien.com/blog/2014/05/style-input-type-range-in-every-browser.html */
  111. /*************************************/
  112. .cr-slider {
  113. -webkit-appearance: none;
  114. /*removes default webkit styles*/
  115. /*border: 1px solid white; *//*fix for FF unable to apply focus style bug */
  116. width: 300px;
  117. /*required for proper track sizing in FF*/
  118. max-width: 100%;
  119. padding-top: 8px;
  120. padding-bottom: 8px;
  121. background-color: transparent;
  122. }
  123. .cr-slider::-webkit-slider-runnable-track {
  124. width: 100%;
  125. height: 3px;
  126. background: rgba(0, 0, 0, 0.5);
  127. border: 0;
  128. border-radius: 3px;
  129. }
  130. .cr-slider::-webkit-slider-thumb {
  131. -webkit-appearance: none;
  132. border: none;
  133. height: 16px;
  134. width: 16px;
  135. border-radius: 50%;
  136. background: #ddd;
  137. margin-top: -6px;
  138. }
  139. .cr-slider:focus {
  140. outline: none;
  141. }
  142. /*
  143. .cr-slider:focus::-webkit-slider-runnable-track {
  144. background: #ccc;
  145. }
  146. */
  147. .cr-slider::-moz-range-track {
  148. width: 100%;
  149. height: 3px;
  150. background: rgba(0, 0, 0, 0.5);
  151. border: 0;
  152. border-radius: 3px;
  153. }
  154. .cr-slider::-moz-range-thumb {
  155. border: none;
  156. height: 16px;
  157. width: 16px;
  158. border-radius: 50%;
  159. background: #ddd;
  160. margin-top: -6px;
  161. }
  162. /*hide the outline behind the border*/
  163. .cr-slider:-moz-focusring {
  164. outline: 1px solid white;
  165. outline-offset: -1px;
  166. }
  167. .cr-slider::-ms-track {
  168. width: 100%;
  169. height: 5px;
  170. background: transparent;
  171. /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
  172. border-color: transparent;/*leave room for the larger thumb to overflow with a transparent border */
  173. border-width: 6px 0;
  174. color: transparent;/*remove default tick marks*/
  175. }
  176. .cr-slider::-ms-fill-lower {
  177. background: rgba(0, 0, 0, 0.5);
  178. border-radius: 10px;
  179. }
  180. .cr-slider::-ms-fill-upper {
  181. background: rgba(0, 0, 0, 0.5);
  182. border-radius: 10px;
  183. }
  184. .cr-slider::-ms-thumb {
  185. border: none;
  186. height: 16px;
  187. width: 16px;
  188. border-radius: 50%;
  189. background: #ddd;
  190. margin-top:1px;
  191. }
  192. .cr-slider:focus::-ms-fill-lower {
  193. background: rgba(0, 0, 0, 0.5);
  194. }
  195. .cr-slider:focus::-ms-fill-upper {
  196. background: rgba(0, 0, 0, 0.5);
  197. }
  198. /*******************************************/
  199. /***********************************/
  200. /* Rotation Tools */
  201. /***********************************/
  202. .cr-rotate-controls {
  203. position: absolute;
  204. bottom: 5px;
  205. left: 5px;
  206. z-index: 1;
  207. }
  208. .cr-rotate-controls button {
  209. border: 0;
  210. background: none;
  211. }
  212. .cr-rotate-controls i:before {
  213. display: inline-block;
  214. font-style: normal;
  215. font-weight: 900;
  216. font-size: 22px;
  217. }
  218. .cr-rotate-l i:before {
  219. content: '↺';
  220. }
  221. .cr-rotate-r i:before {
  222. content: '↻';
  223. }