superdesk/superdesk-client-core

View on GitHub
scripts/core/auth/styles/auth.scss

Summary

Maintainability
Test Coverage
// login-screen.scss
// Styling for login (auth) screen
// ----------------------------------------------------------------------------------------
@import '~mixins.scss';
@import '~variables.scss';


.login-screen {
    position: fixed;
    z-index: 9000;
    inset-inline-start: 0; inset-inline-end: 0; inset-block-end: 0; inset-block-start: 0;
    background-color: var(--sd-colour-bg--02);
    .logo-handler {
        margin-block-end: 60px;
    }
    .login-form-container {
        width: 320px;
        height: 600px;
        padding: 0 15px;
        position: absolute;
        inset-block-start: 50%; margin-block-start: -300px;
        inset-inline-start: 50%; margin-inline-start: -125px;
        padding-block-start: 80px;

        .session-error {
            position: absolute;
            inset-block-start:0;
            width: 240px;
            padding-block-start: 10px;
            padding-block-end: 10px;
            border-radius: 3px;
            color: $white;
            font-size: 12px;
            background-color: hsl(38, 86%, 40%);
            text-align: center;
            margin:0;
        }

        .form-handler {
            width: 240px;
            form {
                .inputs {
                    input {
                        margin-block-end: 16px;
                        height: 40px;
                        background-color: var(--sd-colour-bg--04);
                        color: $white !important;
                        border-radius: 4px;
                        border: none;
                        box-shadow: inset 0 1px 0 0 hsla(0, 0%, 0%, 0.8), 0 1px 0 0 hsla(214, 13%, 60%, 0.4);
                        font-size: 14px;
                        padding-inline-start: 12px;
                        &:autofill {
                            color: var(--sd-colour-interactive--hover) !important;
                            background-color: var(--sd-colour-bg--04) !important;
                            border: 1px solid var(--sd-colour-line--light) !important;
                        }
                        &:focus {
                            box-shadow: inset 0 0 0 1px var(--sd-colour-interactive--alpha-50), inset 0 0 0 4px var(--sd-colour-interactive--alpha-20) !important;
                        }
                    }
                    input:-webkit-autofill,
                    input:-webkit-autofill:hover {
                        -webkit-text-fill-color: var(--sd-colour-interactive--hover) !important;
                        //-webkit-box-shadow: 0 0 0px 1000px #000 inset;
                        transition: background-color 5000s ease-in-out 0s;
                    }
                }
                .buttons {
                    button {
                        width: 100%;
                        position: relative;
                    }
                }
            }
            .links {
                border-block-start: 1px solid var(--sd-colour-line--light);
                padding-block-start: 10px;
            }
            .text {
                color: hsl(214, 13%, 80%);
                margin-block-end: 10px;
                display: block;
                &:hover {
                    text-decoration: underline;
                    cursor: pointer;
                }
            }
            .reset-info {
                color: hsl(214, 13%, 80%);
                margin-block-end: 20px;
                i {
                    vertical-align: sub;
                }
            }
            .transition-id {
                color: hsl(214, 13%, 80%);
                margin-block-start: 20px;
                margin-block-end: 20px;
                display: block;
                font-size: 50px;
                font-weight: bold;
                text-align: center;
            }
            .validation-info {
                margin: -10px 0 10px;
                span {
                    color: #f4c78b;
                    font-size: 12px;
                }
            }
            .error-handler {
                .error {
                    background: #9d0202;
                    padding: 12px;
                    color:#fff;
                    font-size: 12px;
                    line-height: 18px;
                    border-radius: 4px;
                }
                .network-error {
                    height: 44px;
                    border-radius: 3px;
                    span {
                        width: 46px;
                        height: 44px;
                        float: inline-start;
                        border-radius: 3px 0 0 3px;
                        background-repeat: no-repeat;
                        background-position: 8px 7px;
                        opacity: 0.6;
                    }
                    p {
                        margin-inline-start: 46px;
                        color: $white;
                        padding: 6px;
                        line-height: 16px;
                        font-size: 12px;
                    }
                    &.red {
                        background-color: #7a1212;
                        span {
                            background-color: #910707;
                        }
                    }
                    &.yellow {
                        background-color: #bc7c0e;
                        span {
                            background-color: #de8f05;
                        }
                    }
                    &.green {
                        background-color: #157310;
                        span {
                            background-color: #0c8507;
                        }
                    }
                }
            }
        }
    }


    .spinner {
      width: 20px;
      height: 20px;
      position: absolute;
      text-align: center;
      inset-inline-end: 9px;
      inset-block-start: 6px;

      -webkit-animation: rotate 2.0s infinite linear;
      animation: rotate 2.0s infinite linear;
    }

    .dot1, .dot2 {
      width: 60%;
      height: 60%;
      display: inline-block;
      position: absolute;
      inset-block-start: 0;
      background-color: #fff;
      border-radius: 100%;

      -webkit-animation: bounce 2.0s infinite ease-in-out;
      animation: bounce 2.0s infinite ease-in-out;
    }

    .dot2 {
      inset-block-start: auto;
      inset-block-end: 0px;
      -webkit-animation-delay: -1.0s;
      animation-delay: -1.0s;
    }

    @keyframes rotate { 100% { transform: rotate(360deg); -webkit-transform: rotate(360deg) }}

    @keyframes bounce {
      0%, 100% {
        transform: scale(0.0);
        -webkit-transform: scale(0.0);
      } 50% {
        transform: scale(1.0);
        -webkit-transform: scale(1.0);
      }
    }
}