Baltimore-County-Government / dotgov-components

UI design system for Baltimore County's primary website
https://baltimore-county-government.github.io/dotgov-components/
2 stars 0 forks source link

adds scss for updated translate button in header of dotgov #412

Closed bbarbourbcmd closed 1 year ago

bbarbourbcmd commented 2 years ago

Original css currently in page head for reference:

/ --- Updated Translate Header Button: Desktop --- / .dg_mobile-translate-button { display: none; }

.dg_header-right {
    align-items: center;
    display: flex;
    min-width: 40%;
    margin-right: 20px;
}

.dg_header-right .dg_button {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-size: 14px;
    min-width: 130px;
    padding: 10px;
}

.dg_header-right .dg_search-container {
    margin-right: 15px;
    width: 100%;
}

.dg_header-right .dg_button-small i.dg_button_icon + i,
.dg_header-right .dg_button-small i.dg_button_icon + font + i {
    margin-left: 8px;
    margin-right: 0;
}

.dg_header-right .dg_button-small .fa-angle-down {
    transition: all .3s ease-in;
}

.dg_header-right .dg_button-small[aria-expanded="true"] .fa-angle-down {
    transform: rotate(180deg);
}

.dropdown.language-dropdown {
    position: relative;
}

.language-dropdown-menu {
    background-clip: padding-box;
    background-color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .18);
    display: none;
    float: left;
    font-size: 14px;
    left: 0;
    list-style: none;
    margin: 2px 0 0;
    padding: 5px 0;
    position: absolute;
    text-align: left;
    top: 100%;
    width: 100%;
    z-index: 1000;
}

.language-dropdown-menu > li > a {
    background:transparent;
    clear: both;
    color: #333;
    cursor: pointer;
    display: block;
    font-family: "Montserrat",sans-serif;
    font-weight: 600;
    line-height: 1.4;
    padding: 5px 15px;
    position: relative;
    text-align: left;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
}

.language-dropdown-menu > li > a:after {
    background: #c2c2c2;
    bottom: 0;
    content: '';
    height: 1px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: calc(100% - 30px);
}

.language-dropdown-menu > li:last-of-type > a:after {
    display: none;
}

.language-dropdown-menu > li > a:focus,
.language-dropdown-menu > li > a:hover {
    background-color: #ffffff;
    color: #1076bc;
    text-decoration: none;
}

/ --- Updated Translate Header Button: Mobile --- / .dg_mobile-translate-button i { font-size: 26px; margin-bottom: 5px; }

.dg_mobile-translate-button {
    align-items: center;
    display: none;
    flex-direction: column;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 500;
    justify-content: center;
    position: relative;
    text-transform: uppercase;
}

.language-dropdown--mobile {
    display: none;
}

/* --- Google Translate Fix --- */
/* --- When Google Translate is active, '.translated-ltr' class is added to the html element on the page --- */
.translated-ltr .dg_site-header {
    top: 40px !important;
}

.translated-ltr #bc_site-nav .bc_site-nav__toggle-button,
.translated-ltr #bc_site-nav #fake-site-nav-button {
    top: 50px !important;
}

/* --- Media Queries --- */
@media screen and (max-width: 900px) {
    .dg_mobile-translate-button {
        display: flex;
    }

    .dg_header-right {
        min-width: 0;
    }

    .dg_header-right .dropdown.language-dropdown {
        display: none;
    }

    #search-form {
        display: flex;
        z-index: 999;
    }

    .dg_status-text {
        bottom: -131px;
    }

    .dg_site-header {
        margin-bottom: 130px;
    }

    .dropdown.language-dropdown.language-dropdown--mobile {
        display: flex;
        height: 100%;
        justify-content: flex-end;
        padding: 0 20px;
        position: absolute;
        right: 0;
        width: 100%;
    }
}

@media screen and (max-width: 576px) {
    .dg_mobile-translate-button {
        font-size: 10px;
    }

    #search-form {
        top: 65px;
    }
}