snappymail/dev/Styles/Login.less
djmaze 3bad2d5dbd Revamp login screens by moving login icons to the left,
due to issues with browser plugins like LastPass which place buttons on the right.
And added a TOTP icon
2021-11-16 12:35:11 +01:00

192 lines
3.2 KiB
Text

#V-Login, #V-AdminLogin {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
min-width: 250px;
max-width: 600px;
transition: all 0.3s ease-out;
z-index: 5;
}
@glass-color: #fff;
@glass-error-color: #f76260;
@glass-m-color: rgba(255, 255, 255, .8);
.LoginView {
.descWrapper {
color: var(--loading-color, #000);
font-size: 30px;
margin-bottom: 10px;
text-align: center;
text-shadow: var(--loading-text-shadow);
}
form {
background-color: var(--login-bg-color, rgba(0, 0, 0, .5));
border: var(--login-border, 1px solid rgba(255, 255, 255, .2));
border-radius: var(--login-border-radius, 7px);
box-shadow: var(--login-box-shadow);
color: var(--login-color, @glass-m-color);
margin: 0;
padding: 40px 40px 20px 40px;
position: relative;
* {
color: var(--login-color, @glass-m-color);
}
.controls.error * {
color: @glass-error-color;
border-color: @glass-error-color;
}
&.submitting > * {
opacity: 0.3;
}
&.submitting::after{
content: '';
position: absolute;
width: 60px;
height: 60px;
top: 50%;
left: 50%;
margin-top: -30px;
margin-left: -30px;
border: 8px solid transparent;
border-top-color: var(--spinner-color, #fff);
animation: loginRotation 1s infinite ease-in-out;
border-radius: 50%;
z-index: 1052;
}
}
.controls, .control-group {
margin-bottom: 25px;
position: relative;
}
input {
font-size: 18px;
height: 40px;
padding-right: 30px;
&:placeholder {
color: @glass-color;
}
&:focus, &:hover {
border-color: @glass-color;
}
}
input, .btn {
background: none !important;
border: 1px solid @glass-m-color;
color: @glass-color;
}
.fontastic + input {
padding-left: 30px;
}
.controls > .fontastic:first-child {
position: absolute;
font-size: 17px;
line-height: 38px;
left: 6px;
}
input + button {
border: none;
background: none;
cursor: pointer;
display: inline-block;
font-size: 17px;
line-height: 38px;
margin: 0;
padding: 0;
position: absolute;
right: 6px;
top: 0;
}
.btn {
text-transform: uppercase;
font-size: 13px;
&:hover, &:active {
border-color: @glass-color;
}
}
.buttonLogin {
margin: 0;
}
.alert {
position: absolute;
left: 0;
right: 0;
z-index: 1;
display: block;
opacity: 1;
transition: opacity 0.5s linear;
}
.alert[hidden] {
opacity: 0;
}
.language-buttons {
flex-grow: 1;
margin-top: 5px;
text-align: right;
}
.language-button {
padding: 5px;
text-decoration: none;
}
.errorAnimated {
animation: login-form-shake 400ms ease-in-out;
}
.errorAnimated .buttonLogin {
color: #b94a48;
font-weight: bold;
}
}
@media screen and (max-width: 480px) {
.LoginView {
form {
padding: 30px 4vw 10px;
}
}
}
@keyframes loginRotation {
to {transform: rotate(1turn);}
}
@keyframes login-form-shake {
0% {transform: translateX(0);}
12.5% {transform: translateX(-6px)}
37.5% {transform: translateX(5px)}
62.5% {transform: translateX(-3px)}
87.5% {transform: translateX(2px)}
100% {transform: translateX(0)}
}
html.rl-started-trigger .LoginView {
/*transform: scale(1.1);*/
transform: translateY(-20px);
opacity: 0.5;
}