UNPKG

@guardian/threads

Version:
137 lines (116 loc) 2.23 kB
/* Menu */ .root { list-style: none; padding: 0; margin: 0; width: 100%; } .pop { composes: root; padding: calc(var(--sp-vertical) / 2) 0; } .pop .padding { padding: var(--sp-vertical) calc(var(--sp-base) * 2.5) var(--sp-vertical) calc(var(--sp-base) * 1.5); } .pop .sublabel { margin-right: calc(-1 * var(--sp-base)); } .pop .separator { margin: calc(var(--sp-vertical) / 2) 0; } .root[data-enable-hover] .item:hover { background: var(--color-selected); color: var(--color-selected-text); } /* MenuItem */ .item { display: flex; flex-direction: row; justify-content: space-between; align-items: center; appearance: none; font-size: 1rem; background: none; border: 0; color: currentColor; text-decoration: none; white-space: nowrap; width: 100%; text-align: left; cursor: pointer; box-sizing: border-box; padding: 0; padding-right: calc(var(--sp-vertical) / 1.25); } .item[data-emulate-hover] { background: var(--color-selected); color: var(--color-selected-text); } .item:hover .check { color: currentColor; } .item:focus { outline: none; box-shadow: 0 0 0 2px var(--color-primary-light); } .item[disabled] { pointer-events: none; opacity: 0.5; } .item[data-checked='true'][data-is-default='false'] .label { position: relative; font-weight: 600; } .titleLabel { font-size: var(--fs-large); font-weight: 500; margin: var(--sp-base) 0; } .separator { border: 0; margin: 0; padding: 0; height: 1px; background: var(--color-border); } .flex { display: flex; align-items: center; justify-content: space-between; position: relative; } /* Padding is a seperate element to allow the label's `for` attribute to bleed right to the edge of the item. */ .padding { display: block; width: 100%; cursor: inherit; padding: var(--sp-base); padding-left: calc(var(--sp-vertical) / 1.25); } .check { position: absolute; margin: auto; top: 0; bottom: 0; left: -1.6em; width: 1em; color: var(--non-semantic-color-coral-100); } .icon { width: 1.6em; display: inline-flex; } .sublabel { font-size: var(--fs-small); opacity: 0.8; margin-left: calc(var(--sp-base) * 2); } .nested { list-style: none; padding: 0; margin: 0; } .nested .padding { padding-left: 3em; }