Contents

MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
Line 538: Line 538:
     }
     }


}
/* ============================================================
  WIKIPARTNER
  USERNAME OUTSIDE HAMBURGER
============================================================ */
.wp-user-primary {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    list-style: none;
}
.wp-user-primary.is-empty {
    display: none;
}
.wp-user-primary > li {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    list-style: none;
}
.wp-user-primary > li::before,
.wp-user-primary > li::after {
    display: none !important;
    content: none !important;
}
.wp-user-primary > li > a {
    min-height: 34px;
    padding: 8px 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: var(--wp-teal);
    font-family: var(--wp-body-font);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    transition:
        color 0.15s ease,
        background 0.15s ease;
}
.wp-user-primary > li > a:hover {
    background: var(--wp-teal-soft);
    color: var(--wp-teal-dark);
    text-decoration: none !important;
}
/* Dark mode username */
html.wp-theme-dark
.wp-user-primary > li > a {
    color: var(--wp-teal);
}
html.wp-theme-dark
.wp-user-primary > li > a:hover {
    background: var(--wp-teal-soft);
    color: var(--wp-teal-dark);
}
/* Keep account controls neatly aligned */
.wp-user-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
}

Revision as of 23:51, 19 August 2026

/* ============================================================
   WIKIPARTNER
   LOGGED-IN HAMBURGER USER MENU
============================================================ */


/* ============================================================
   LOGGED-IN TOP LEVEL
============================================================ */

.wp-user-menu-list.wp-is-logged-in {
    position: relative;

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 8px;

    flex-wrap: nowrap;
}


/* Username remains visible */

.wp-user-menu-list.wp-is-logged-in > #pt-userpage {
    display: flex;

    align-items: center;
}


.wp-user-menu-list.wp-is-logged-in > #pt-userpage > a {
    min-height: 34px;

    padding:
        8px
        11px;

    display: inline-flex;

    align-items: center;

    background: transparent;

    border: 0;

    color: var(--wp-teal);

    font-size: 12px;

    font-weight: 700;

    text-decoration: none !important;
}


.wp-user-menu-list.wp-is-logged-in > #pt-userpage > a:hover {
    background:
        var(--wp-teal-soft);

    border-radius: 7px;

    color:
        var(--wp-teal-dark);
}


/* ============================================================
   DROPDOWN WRAPPER
============================================================ */

.wp-user-dropdown {
    position: relative;

    margin: 0 !important;
    padding: 0 !important;

    display: flex;

    align-items: center;

    list-style: none !important;
}


/* ============================================================
   HAMBURGER BUTTON
============================================================ */

.wp-user-menu-trigger {
    width: 36px;
    height: 36px;

    margin: 0;
    padding: 0;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    appearance: none;

    cursor: pointer;

    background:
        var(--wp-teal-soft);

    border:
        1px solid
        #CEE0DB;

    border-radius: 8px;

    color:
        var(--wp-teal);

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}


.wp-user-menu-trigger:hover {
    background:
        #E5F1EE;

    border-color:
        #B7D3CC;

    color:
        var(--wp-teal-dark);
}


.wp-user-menu-trigger:active {
    transform:
        scale(0.95);
}


.wp-user-menu-trigger:focus-visible {
    outline:
        2px solid
        var(--wp-gold);

    outline-offset: 2px;
}


/* ============================================================
   THREE HORIZONTAL LINES
============================================================ */

.wp-menu-bars {
    width: 17px;
    height: 14px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;
}


.wp-menu-bars > span {
    width: 100%;
    height: 2px;

    display: block;

    background:
        currentColor;

    border-radius: 999px;

    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}


/*
   Cute small animation when menu opens.
*/

.wp-user-dropdown.is-open
.wp-menu-bars > span:nth-child(1) {
    transform:
        translateY(6px)
        rotate(45deg);
}


.wp-user-dropdown.is-open
.wp-menu-bars > span:nth-child(2) {
    opacity: 0;
}


.wp-user-dropdown.is-open
.wp-menu-bars > span:nth-child(3) {
    transform:
        translateY(-6px)
        rotate(-45deg);
}


/* ============================================================
   DROPDOWN MENU
============================================================ */

.wp-user-dropdown-menu {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    z-index: 1000;

    width: 210px;

    margin: 0;
    padding: 6px;

    display: block;

    list-style: none;

    background:
        var(--wp-surface);

    border:
        1px solid
        var(--wp-border);

    border-radius: 10px;

    box-shadow:
        0 12px 32px
        rgba(18, 35, 63, 0.14);
}


.wp-user-dropdown-menu[hidden] {
    display: none !important;
}


/* ============================================================
   MENU ITEMS
============================================================ */

.wp-user-dropdown-menu > li {
    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    display: block;

    list-style: none !important;
}


.wp-user-dropdown-menu > li::before,
.wp-user-dropdown-menu > li::after {
    display: none !important;

    content: none !important;
}


/* ============================================================
   MENU LINKS
============================================================ */

.wp-user-dropdown-menu > li > a {
    width: 100%;

    min-height: 38px;

    padding:
        9px
        11px;

    display: flex;

    align-items: center;

    border: 0 !important;

    border-radius: 7px;

    background:
        transparent !important;

    color:
        var(--wp-text) !important;

    font-size: 12px;

    font-weight: 500;

    line-height: 1.25;

    text-align: left;

    white-space: normal;

    text-decoration: none !important;
}


.wp-user-dropdown-menu > li > a:hover {
    background:
        var(--wp-teal-soft) !important;

    color:
        var(--wp-teal-dark) !important;
}


/* ============================================================
   LOG OUT
============================================================ */

.wp-user-dropdown-menu #pt-logout > a {
    margin-top: 4px;

    border-top:
        1px solid
        var(--wp-border) !important;

    border-radius:
        0
        0
        7px
        7px;
}


/* ============================================================
   THEME INSIDE LOGGED-IN MENU
============================================================ */

.wp-user-dropdown-menu
.wikipartner-theme-item {
    width: 100%;

    margin: 0 !important;
}


.wp-user-dropdown-menu
.wikipartner-theme-toggle {
    width: 100% !important;
    height: 38px !important;

    min-height: 38px;

    margin: 0 !important;

    padding:
        8px
        11px !important;

    display: flex !important;

    align-items: center;
    justify-content: flex-start !important;

    gap: 10px;

    border:
        0 !important;

    border-radius:
        7px !important;

    background:
        transparent !important;

    color:
        var(--wp-text) !important;

    box-shadow:
        none !important;

    transform:
        none !important;

    font-size: 12px;

    font-weight: 500;
}


.wp-user-dropdown-menu
.wikipartner-theme-toggle:hover {
    background:
        var(--wp-teal-soft) !important;

    color:
        var(--wp-teal-dark) !important;

    box-shadow:
        none !important;

    transform:
        none !important;
}


.wp-user-dropdown-menu
.wp-theme-icon {
    width: 18px;

    flex: 0 0 18px;
}


.wp-theme-menu-label {
    display: none;
}


/*
   Show the text Dark mode / Light mode
   only when the theme button is inside
   the logged-in hamburger menu.
*/

.wp-user-dropdown-menu
.wp-theme-menu-label {
    display: inline;
}


/* ============================================================
   LOGGED-OUT THEME BUTTON
============================================================ */

/*
   Logged out:
   Create account | moon/sun | Log in

   Hide the text label so only the cute
   round icon remains.
*/

.wp-user-menu-list.wp-is-logged-out
.wp-theme-menu-label {
    display: none;
}


/* ============================================================
   DARK MODE HAMBURGER
============================================================ */

html.wp-theme-dark
.wp-user-menu-trigger {
    background:
        #18332F;

    border-color:
        #31514D;

    color:
        #69C9BD;
}


html.wp-theme-dark
.wp-user-menu-trigger:hover {
    background:
        #20413C;

    border-color:
        #42645F;

    color:
        #91DDD4;
}


html.wp-theme-dark
.wp-user-dropdown-menu {
    background:
        #111D20;

    border-color:
        var(--wp-border);

    box-shadow:
        0 14px 38px
        rgba(0, 0, 0, 0.38);
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 700px) {

    .wp-user-menu-trigger {
        width: 33px;
        height: 33px;

        border-radius: 7px;
    }


    .wp-user-dropdown-menu {
        width: 195px;

        right: 0;
    }


    .wp-user-menu-list.wp-is-logged-in
    > #pt-userpage > a {
        max-width: 140px;

        overflow: hidden;

        text-overflow: ellipsis;

        white-space: nowrap;
    }

}

/* ============================================================
   WIKIPARTNER
   USERNAME OUTSIDE HAMBURGER
============================================================ */

.wp-user-primary {
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;

    list-style: none;
}


.wp-user-primary.is-empty {
    display: none;
}


.wp-user-primary > li {
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;

    list-style: none;
}


.wp-user-primary > li::before,
.wp-user-primary > li::after {
    display: none !important;
    content: none !important;
}


.wp-user-primary > li > a {
    min-height: 34px;

    padding: 8px 11px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 7px;

    color: var(--wp-teal);

    font-family: var(--wp-body-font);

    font-size: 12px;

    font-weight: 700;

    line-height: 1;

    white-space: nowrap;

    text-decoration: none !important;

    transition:
        color 0.15s ease,
        background 0.15s ease;
}


.wp-user-primary > li > a:hover {
    background: var(--wp-teal-soft);

    color: var(--wp-teal-dark);

    text-decoration: none !important;
}


/* Dark mode username */

html.wp-theme-dark
.wp-user-primary > li > a {
    color: var(--wp-teal);
}


html.wp-theme-dark
.wp-user-primary > li > a:hover {
    background: var(--wp-teal-soft);

    color: var(--wp-teal-dark);
}


/* Keep account controls neatly aligned */

.wp-user-area {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 6px;
}