anephenix/ui

View on GitHub
src/components/terminal/Terminal.scss

Summary

Maintainability
Test Coverage
@import '../../../design-system/colours.scss';

#terminal {
    display: flex;
    flex-direction: column;
    width: 400px;
    border: solid 1px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);

    @media screen and (max-width: 720px) {
        width: 100%;
    }

    @media screen and (prefers-color-scheme: dark) {
        border: solid 1px rgba(255, 255, 255, 0.175);
        box-shadow: 2px 2px 4px rgba(255, 255, 255, 0.025);
    }

    #title-bar {
        padding: 4px;
        display: grid;
        width: 100%;
        align-items: center;
        justify-content: center;
        grid-template-columns: 20% 60% 20%;

        #title-bar-title {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10pt;
            color: white;
            font-weight: 700;
        }

        #title-bar-buttons {
            display: flex;
            padding: 4px;
            width: 56px;
            justify-content: space-between;

            .title-bar-button {
                width: 12px;
                height: 12px;
                border-radius: 6px;
            }

            #close {
                background: $window-title-bar-close;
            }

            #minimize {
                background: $window-title-bar-minimize;
            }

            #maximize {
                background: $window-title-bar-maximize;
            }
        }

        #title-bar-actions {
            display: flex;
            align-items: flex-end;
            justify-content: flex-end;

            .title-bar-action {
                cursor: pointer;
                font-size: 8pt;
                text-transform: uppercase;
                font-weight: 700;
                padding: 4px 8px;
                border-radius: 4px;
                color: rgb(143, 236, 174);
                background: rgba(143, 236, 174, 0.2);
                transition: all 0.2s linear;

                &:hover {
                    background: rgba(143, 236, 174, 0.3);
                    color: rgb(205, 255, 222);
                }
            }
        }
    }

    pre {
        display: flex;
        padding: 30px 10px;
        margin: 0;
        background-color: transparent !important;
        color: rgb(180, 240, 131) !important;
        font-size: 10pt;

        @media screen and (max-width: 720px) {
            overflow-x: scroll;
        }

        code {
            font-family: 'Menlo', 'Monaco', 'Courier New', Courier, monospace;
            font-weight: 400;
        }
    }
}