com.phloxui
Version:
PhloxUI Ng2+ Framework
411 lines (383 loc) • 14.7 kB
text/less
material-image-selector {
.material-image-selector {
position: relative;
>.material-image-selector-readOnly {
display: flex;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
}
>.material-image-selector-disabled {
background-color: extract(@CLR_1, 7);
opacity: 0.8;
cursor: not-allowed ;
}
>.material-image-selector-browse {
display: flex;
position: relative;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
object-fit: contain;
border: 1.5px dotted extract(@CLR_1, 6);
background-color: extract(@CLR_1, 7);
input {
position: absolute;
cursor: pointer;
width: 100%;
height: 100%;
opacity: 0;
}
>.wrapper-drag-image-btn-browse {
display: block;
img {
display: flex;
margin: auto;
}
>.label-drag-image {
display: flex;
justify-content: center;
margin-top: 5pt;
margin-bottom: 5pt;
.FC2();
color: extract(@CLR_1, 1);
}
>.label-or {
display: flex;
justify-content: center;
margin-bottom: 5pt;
color: extract(@CLR_1, 1);
}
}
}
>.material-image-selector-crop {
display: flex;
position: relative;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
object-fit: contain;
>.material-image-selector-edited-image {
.material-image-selector-browse();
>.image-crop {
z-index: 1;
}
>.picture-frame {
position: absolute;
border: 1px solid extract(@CLR_1, 1);
background-color: extract(@CLR_1, 3);
box-shadow: 2px 3px 20px extract(@CLR_1, 4);
>.icon-close {
display: flex;
justify-content: center;
align-items: center;
width: 20px;
height: 15pt;
border-radius: 50%;
background-color: extract(@CLR_1, 2);
position: absolute;
cursor: pointer;
top: -10px;
right: -10px;
border: 1px solid extract(@CLR_1, 1);
box-shadow: 1px 1px 20px extract(@CLR_1, 4);
color: extract(@CLR_1, 6);
&:before {
content: "Y";
font-family: 'PhloxGlyphicons';
font-size: 5pt;
}
}
}
}
>.wrapper-controller-crop-image {
display: flex;
position: absolute;
justify-content: center;
align-items: flex-start;
z-index: 2;
top: 0;
left: 0;
width: 100%;
height: 40pt;
>.bar-controller-crop-image {
display: flex;
position: relative;
background-color: #292626;
border-radius: 3px;
>.wrapper-icon {
display: flex;
cursor: pointer;
width: 33pt;
height: 33pt;
padding: 8pt;
}
>.wrapper-icon-rotate {
.wrapper-icon();
fill: extract(@CLR_1, 9);
}
>.wrapper-icon-correct {
.wrapper-icon();
fill: extract(@CLR_J, 6);
}
>.wrapper-icon-cancel {
.wrapper-icon();
padding: 10pt 9pt;
fill: extract(@CLR_D, 5);
}
svg {
width: 100%;
height: 100%;
}
>.arrow-bar-controller-crop-image {
width: 10pt;
height: 10pt;
background-color: #292626;
position: absolute;
left: 17px;
top: 27.5pt;
transform: rotate(45deg);
}
}
}
>.hidenZoomer {
height: 100% ;
}
ngx-croppie {
position: absolute;
left: 0;
top: 0;
padding-top: 40pt;
width: 100%;
height: calc(100% - 39pt);
.croppie-container {
width: 100%;
height: 100%;
}
.croppie-container .cr-image {
z-index: -1;
position: absolute;
top: 0;
left: 0;
transform-origin: 0 0;
max-height: none;
max-width: none;
}
.croppie-container .cr-boundary {
position: relative;
overflow: hidden;
margin: 0 auto;
z-index: 1;
width: 100%;
height: 100%;
}
.croppie-container .cr-viewport,
.croppie-container .cr-resizer {
position: absolute;
border: 2px solid #fff;
margin: auto;
top: 0;
bottom: 0;
right: 0;
left: 0;
box-shadow: 0 0 2000px 2000px rgba(0, 0, 0, 0.5);
z-index: 0;
}
.croppie-container .cr-resizer {
z-index: 2;
box-shadow: none;
pointer-events: none;
}
.croppie-container .cr-resizer-vertical,
.croppie-container .cr-resizer-horisontal {
position: absolute;
pointer-events: all;
}
.croppie-container .cr-resizer-vertical::after,
.croppie-container .cr-resizer-horisontal::after {
display: block;
position: absolute;
box-sizing: border-box;
border: 1px solid black;
background: #fff;
width: 10px;
height: 10px;
content: '';
}
.croppie-container .cr-resizer-vertical {
bottom: -5px;
cursor: row-resize;
width: 100%;
height: 10px;
}
.croppie-container .cr-resizer-vertical::after {
left: 50%;
margin-left: -5px;
}
.croppie-container .cr-resizer-horisontal {
right: -5px;
cursor: col-resize;
width: 10px;
height: 100%;
}
.croppie-container .cr-resizer-horisontal::after {
top: 50%;
margin-top: -5px;
}
.croppie-container .cr-original-image {
display: none;
}
.croppie-container .cr-vp-circle {
border-radius: 50%;
}
.croppie-container .cr-overlay {
z-index: 1;
position: absolute;
cursor: move;
touch-action: none;
}
.croppie-container .cr-slider-wrap {
width: 100%;
z-index: 5;
padding: 15px 12.5%;
text-align: center;
}
.croppie-result {
position: relative;
overflow: hidden;
}
.croppie-result img {
position: absolute;
}
.croppie-container .cr-image,
.croppie-container .cr-overlay,
.croppie-container .cr-viewport {
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
}
/*************************************/
/***** STYLING RANGE INPUT ***********/
/*************************************/
/*http://brennaobrien.com/blog/2014/05/style-input-type-range-in-every-browser.html */
/*************************************/
.cr-slider {
-webkit-appearance: none;
/*removes default webkit styles*/
/*border: 1px solid white; *//*fix for FF unable to apply focus style bug */
width: 100%;
/*required for proper track sizing in FF*/
max-width: 100%;
padding-top: 8px;
padding-bottom: 8px;
background-color: transparent;
}
.cr-slider::-webkit-slider-runnable-track {
width: 100%;
height: 3px;
background: rgba(0, 0, 0, 0.5);
border: 0;
border-radius: 3px;
}
.cr-slider::-webkit-slider-thumb {
-webkit-appearance: none;
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: #ddd;
margin-top: -6px;
}
.cr-slider:focus {
outline: none;
}
/*
.cr-slider:focus::-webkit-slider-runnable-track {
background: #ccc;
}
*/
.cr-slider::-moz-range-track {
width: 100%;
height: 3px;
background: rgba(0, 0, 0, 0.5);
border: 0;
border-radius: 3px;
}
.cr-slider::-moz-range-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: #ddd;
margin-top: -6px;
}
/*hide the outline behind the border*/
.cr-slider:-moz-focusring {
outline: 1px solid white;
outline-offset: -1px;
}
.cr-slider::-ms-track {
width: 100%;
height: 5px;
background: transparent;
/*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
border-color: transparent;/*leave room for the larger thumb to overflow with a transparent border */
border-width: 6px 0;
color: transparent;/*remove default tick marks*/
}
.cr-slider::-ms-fill-lower {
background: rgba(0, 0, 0, 0.5);
border-radius: 10px;
}
.cr-slider::-ms-fill-upper {
background: rgba(0, 0, 0, 0.5);
border-radius: 10px;
}
.cr-slider::-ms-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: #ddd;
margin-top:1px;
}
.cr-slider:focus::-ms-fill-lower {
background: rgba(0, 0, 0, 0.5);
}
.cr-slider:focus::-ms-fill-upper {
background: rgba(0, 0, 0, 0.5);
}
/*******************************************/
/***********************************/
/* Rotation Tools */
/***********************************/
.cr-rotate-controls {
position: absolute;
bottom: 5px;
left: 5px;
z-index: 1;
}
.cr-rotate-controls button {
border: 0;
background: none;
}
.cr-rotate-controls i:before {
display: inline-block;
font-style: normal;
font-weight: 900;
font-size: 22px;
}
.cr-rotate-l i:before {
content: '↺';
}
.cr-rotate-r i:before {
content: '↻';
}
}
}
}
}