/** * Dropdown ([role="list"]) */ // Menu details[role="list"], li[role="list"] { position: relative; } details[role="list"] summary + ul, li[role="list"] > ul { display: flex; z-index: 99; position: absolute; top: auto; right: 0; left: 0; flex-direction: column; margin: 0; padding: 0; border: var(--border-width) solid var(--dropdown-border-color); border-radius: var(--border-radius); border-top-right-radius: 0; border-top-left-radius: 0; background-color: var(--dropdown-background-color); box-shadow: var(--card-box-shadow); color: var(--dropdown-color); white-space: nowrap; li { width: 100%; margin-bottom: 0; padding: calc(var(--form-element-spacing-vertical) * 0.5) var(--form-element-spacing-horizontal); list-style: none; &:first-of-type { margin-top: calc(var(--form-element-spacing-vertical) * 0.5); } &:last-of-type { margin-bottom: calc(var(--form-element-spacing-vertical) * 0.5); } a { display: block; margin: calc(var(--form-element-spacing-vertical) * -0.5) calc(var(--form-element-spacing-horizontal) * -1); padding: calc(var(--form-element-spacing-vertical) * 0.5) var(--form-element-spacing-horizontal); overflow: hidden; color: var(--dropdown-color); text-decoration: none; text-overflow: ellipsis; &:hover { background-color: var(--dropdown-hover-background-color); } } } } // Marker details[role="list"] summary, li[role="list"] > a { &::after { display: block; width: 1rem; height: calc(1rem * var(--line-height, 1.5)); margin-inline-start: 0.5rem; float: right; transform: rotate(0deg); background-position: right center; background-size: 1rem auto; background-repeat: no-repeat; content: ""; } } // Global dropdown only details[role="list"] { padding: 0; border-bottom: none; // Style as