.dropdown-button {
    position: relative;
    display: inline-block;
}

/*
* The menu begins exactly where the button ends.
* No margin and no top offset.
*/
.dropdown-menu {
    display: none;

    position: absolute;
    top: 100%;
    right: 0;  /* Aligns right edge of dropdown to right edge of button. use left:0 if button is left justified */
    z-index: 100;

    min-width: 100%;
    padding: 4px;

    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(16,24,40,.12);
}

/*
* When open, square off the bottom of the button so the
* button and menu appear to be a single continuous control.
*/
.dropdown-button.open .dropdown-toggle {
    border-radius: 6px 6px 0 0;
}

.dropdown-button.open .dropdown-menu {
    display: grid;
}

.dropdown-menu button {
    border: 0;
    background: transparent;
    padding: 7px 9px;
    text-align: left;
    white-space: nowrap;
    color: var(--ink);
    border-radius: 4px;
}

.dropdown-menu button:hover {
    background: var(--panel-2);
}