92 lines
1.6 KiB
SCSS
92 lines
1.6 KiB
SCSS
@import "../../styles/mixins";
|
|
|
|
.AvatarEditable {
|
|
label {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
width: 7.5rem;
|
|
height: 7.5rem;
|
|
margin-bottom: 2rem;
|
|
display: flex !important;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: var(--color-primary);
|
|
border-radius: 50%;
|
|
color: white;
|
|
font-size: 3rem;
|
|
cursor: var(--custom-cursor, pointer);
|
|
position: relative;
|
|
overflow: hidden;
|
|
outline: none !important;
|
|
transition: border-radius 200ms;
|
|
|
|
input {
|
|
display: none;
|
|
}
|
|
|
|
img {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.icon {
|
|
transform: scale(1);
|
|
transition: transform 0.15s linear;
|
|
z-index: var(--z-register-add-avatar);
|
|
}
|
|
|
|
// @optimization The weirdest workaround for screen animation lag
|
|
@include while-transition() {
|
|
input,
|
|
.icon,
|
|
&::after {
|
|
display: none !important;
|
|
}
|
|
|
|
img {
|
|
position: static !important;
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
.icon {
|
|
transform: scale(1.2);
|
|
}
|
|
}
|
|
|
|
&.filled {
|
|
background-color: var(--color-background);
|
|
|
|
&::after {
|
|
content: "";
|
|
display: block;
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(black, 0.4);
|
|
}
|
|
}
|
|
|
|
&.disabled {
|
|
pointer-events: none;
|
|
|
|
.icon {
|
|
display: none;
|
|
}
|
|
|
|
&::after {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&.rounded-square {
|
|
border-radius: var(--border-radius-forum-avatar);
|
|
}
|
|
}
|
|
}
|