Maingron/MainOS

View on GitHub
Program Files/Explorer/Start/startmenu.scss

Summary

Maintainability
Test Coverage
:root {
    --background-color: #fff;
    --color-type-2: #fff;
    --background-color-type-2: #bcf;
    --font: var(--font), sans-serif;
    --border-width: 2px;
}

html, body {
    background-color: transparent !important;
}

body {
    overflow: hidden;
    background-color: transparent !important;
    user-select: none;
}

body.big_buttons {
    #start {
        width: 32rem;
        #statusbar {
            button {
                width: 2.8rem;
                height: 2.8rem;
            }
        }

        #center {
            #left {
                a {
                    img {
                        height: 2.8rem;
                        width: 2.8rem;
                    }
                    font-size: 1.1em;
                }
            }
        }
    }
}

* {
    box-sizing: border-box;
}

#startbutton {
    background: transparent;
    position: absolute;
    height: 0;
    width: 0;
    border: none;
    display: inline;
    bottom: 0;
    left: 0;
    overflow: hidden;
}

#onout {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#start {
    position: fixed;
    top: var(--glassyElementSpacing);
    bottom: var(--glassyElementSpacing);
    left: var(--glassyElementSpacing);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2*var(--glassyElementSpacing));
    height: auto;
    width: 40rem;
    max-width: calc(100% - 2*var(--glassyElementSpacing));
    border: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: transparent;
    border: 1px solid #555555;
    background-color: var(--glassyElementBackground);
    backdrop-filter: blur(var(--glassyElementBlur));

    #statusbar {
        background-color: var(--glassyElementBackground);
        backdrop-filter: blur(var(--glassyElementBlur));
        bottom: 0;
        left: 0;
        position: relative;
        width: 100%;
        height: 60px;
        padding: 0 .25rem;
        order: 99;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        &>div {
            display: inline-flex;
            flex-direction: row;
            width: 1px;
            flex-grow: 1;
            align-items: center;

            &.align-end {
                justify-content: flex-end;
            }
        }


        button {
            position: relative;
            display: inline-block;
            height: calc(100% - 10px);
            margin: 5px;
            aspect-ratio: 1/1;
            box-sizing: border-box;
            padding: 1px;
            overflow: hidden;
            background: transparent;

            &.usericon-button {
                padding: 0;
                outline-offset: 0;
            }

            img {
                height: 100%;
                margin: 0;
                border-radius: inherit;
            }
            span {
                position: absolute;
                display: none;
            }
        }
    }

    #center {
        display: flex;
        position: relative;
        width: 100%;
        height: calc(100% - 60px);
        box-sizing: border-box;
    
        #left {
            display: block;
            position: relative;
            height: 100%;
            width: 100%;
            flex-wrap: wrap;
            align-content: flex-start;
            overflow: auto;
            scrollbar-width: thin;
            padding: 1em;

            &>span {
                background-color: var(--glassyElementBackground);
                backdrop-filter: blur(var(--glassyElementBlur));
                display: block;
                position: sticky;
                top: 0;
                z-index: 9;
                line-height: 1.75;
                padding-left: calc(2.4rem + 15px);
            }

            #allprograms {
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                align-content: flex-start;

                a {
                    width: 100%;
                    // width: calc(50% - .5em);

                    // &:nth-of-type(2n) {
                    //     margin-left: 1em;
                    // }
                }
            }

            a {
                position: relative;
                display: flex;
                height: auto;
                width: 100%;
                overflow: hidden;
                align-items: center;
                line-height: 2;
                margin-bottom: 2px;
                text-decoration: none;
                border-radius: var(--border-radius);
    
                span {
                    position: relative;
                    display: inline;
                    left: 4px;
                    white-space: nowrap;
                    width: calc(100% - 41px);
                    overflow: hidden;
                    text-overflow: ellipsis;
                    bottom: 1px;
                }
    
                img {
                    margin: .1rem;
                    padding: .35rem;
                    height: 2.25rem;
                    width: 2.25rem;
                    display: inline;
                    object-fit: contain;
                }
            }
        }
    }
}

#start #center #left #moreandinfo {
    display: inline-block;
    background: black;
    padding: 0 .75em;
    line-height: 1.2;
    width: 80%;
    margin: 10px 10%;
    background-color: var(--glassyElementBackground);
    backdrop-filter: blur(var(--glassyElementBlur));
    border-radius: var(--border-radius);

    a {
        display: inline;
        width: unset;
        text-decoration: underline;
        color: revert;
    }
}

@media (prefers-color-scheme:dark) {

    :root {
        // --background-color: var(--black);
    }

    #start {
        #center {
            #left {
                // background: var(--black);
                div {
                    p {
                        color: #fff;
                    }
                }
            }
        }
    }
}