UNPKG

react-mobile-cropper

Version:

The react mobile cropper inspired by Android mobile croppers

152 lines (148 loc) 3.29 kB
.rmc-cropper { color: #61DAFB; } .rmc-cropper-wrapper { padding: 40px 10px; overflow: hidden; background: black; max-height: 100%; } .rmc-cropper-wrapper--with-navigation { padding-bottom: 80px; } .rmc-cropper-wrapper__content { position: relative; } .rmc-cropper-wrapper__fade { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; min-height: 0; } .rmc-cropper-wrapper__navigation { position: absolute; bottom: 0; max-width: 450px; width: 100%; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); } .rmc-cropper-wrapper__spinner { visibility: hidden; opacity: 0; -webkit-transition: 0.5s; transition: 0.5s; -webkit-transition-delay: 0s; transition-delay: 0s; stroke: currentColor; position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .rmc-cropper-wrapper__spinner--visible { -webkit-transition-delay: 0.5s; transition-delay: 0.5s; opacity: 1; visibility: visible; } .rmc-navigation { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; padding: 20px 15px; } .rmc-navigation__rotator { width: 100%; margin-left: 10px; margin-right: 10px; } .rmc-navigation__button { cursor: pointer; width: 24px; height: 24px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -ms-flex-negative: 0; flex-shrink: 0; margin: 0 5px; background: none; border: none; outline: none; -webkit-transition: -webkit-transform 0.5s; transition: -webkit-transform 0.5s; transition: transform 0.5s; transition: transform 0.5s, -webkit-transform 0.5s; padding: 0; } .rmc-navigation__button:hover, .rmc-navigation__button:focus { -webkit-transform: scale(1.1); transform: scale(1.1); } .rmc-rotate-component__bars { cursor: -webkit-grab; cursor: grab; width: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; min-width: 0; position: relative; height: 15px; } .rmc-rotate-component__bars--dragging { cursor: -webkit-grabbing !important; cursor: grabbing !important; } .rmc-rotate-component__bar { position: absolute; left: 0; height: 15px; width: 3px; -ms-flex-negative: 0; flex-shrink: 0; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); background: white; } .rmc-rotate-component__bar--highlighted { background-color: currentColor; } .rmc-rotate-component__bar--zero { height: 20px; } .rmc-rotate-component__value { position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); width: 3px; background-color: currentColor; color: currentColor; height: 25px; border-radius: 2px; } .rmc-rotate-component__value-number { position: absolute; top: -20px; color: inherit; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); font-size: 12px; } body.dragging { cursor: -webkit-grabbing !important; cursor: grabbing !important; }