Changeset 83b8b8f in Klonkt for src/assets/css/style.css


Ignore:
Timestamp:
06/20/2026 02:04:32 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
999aad2
Parents:
2149f5a
Message:

feat(i18n): styled language dropdown in the header (instead of native select)

Custom dropdown (details/summary, like the user menu): toggle = globe + code +
chevron; menu = full names with code, accent on the active language, clean
shadow/border. Closes on outside click (handler extended). style.css?v=28.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    r2149f5a r83b8b8f  
    15041504}
    15051505
    1506 /* Taal-keuze in de header-nav (NL/EN/DE). Past bij de pill-knoppen ernaast. */
    1507 .nav-lang {
    1508     background: transparent; color: var(--ink);
    1509     border: 1px solid var(--rule); border-radius: 999px;
    1510     padding: .35rem .5rem; font-size: .8rem; font-weight: 600;
    1511     font-family: inherit; cursor: pointer; line-height: 1;
    1512 }
    1513 .nav-lang:hover { border-color: var(--accent); }
    1514 .nav-lang option { background: var(--paper); color: var(--ink); }
     1506/* Taal-keuze in de header-nav (NL/EN/DE) — eigen gestylede dropdown. */
     1507.lang-menu { position: relative; }
     1508.lang-menu > summary {
     1509    list-style: none; cursor: pointer;
     1510    display: inline-flex; align-items: center; gap: .3rem;
     1511    padding: .35rem .55rem; border-radius: 999px;
     1512    border: 1px solid var(--rule); background: transparent; color: var(--ink);
     1513}
     1514.lang-menu > summary::-webkit-details-marker { display: none; }
     1515.lang-menu > summary:hover { border-color: var(--accent); }
     1516.lang-toggle .lang-code { font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
     1517.lang-toggle .icon { width: 16px; height: 16px; opacity: .8; }
     1518.lang-caret { width: 12px; height: 12px; opacity: .7; transition: transform .15s; }
     1519.lang-menu[open] .lang-caret { transform: rotate(180deg); }
     1520.lang-dropdown {
     1521    position: absolute; top: calc(100% + 8px); right: 0;
     1522    min-width: 170px; z-index: 60;
     1523    background: var(--paper); border: 1px solid var(--rule);
     1524    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.22);
     1525    padding: .35rem; display: flex; flex-direction: column;
     1526}
     1527.lang-item {
     1528    display: flex; align-items: center; gap: .6rem;
     1529    padding: .5rem .65rem; border-radius: 8px;
     1530    color: var(--ink); text-decoration: none; font-size: .9rem;
     1531}
     1532.lang-item:hover { background: var(--paper-2); }
     1533.lang-item.is-active { color: var(--accent); font-weight: 600; }
     1534.lang-item-code {
     1535    font-size: .7rem; font-weight: 700; opacity: .6;
     1536    min-width: 1.6em;
     1537}
    15151538@media (max-width: 400px) {
    15161539    .masthead { padding: calc(.5rem + var(--safe-top)) 0 .5rem; }
Note: See TracChangeset for help on using the changeset viewer.