UNPKG

@synergy-design-system/components

Version:

This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define

87 lines (72 loc) 2.77 kB
// src/components/option/option.custom.styles.ts import { css } from "lit"; var option_custom_styles_default = css` /** * The syn-option is now able to adjust its height from a parent item * This is done by exposing multiple css variables to the outside: * * --option-min-height (defaults to 48px) The minimal height of an element * --option-padding (defaults to var(--syn-spacing-small) var(--syn-spacing-medium)) The padding to use * --option-font-size (defaults to var(--syn-font-size-medium)) The font size to use * --option-icon-size (defaults to var(--syn-spacing-large)) The size of the checkmark * * See below for usage of these variables */ .option { font-size: var(--option-font-size, var(--syn-font-size-medium)); /* Height is dependent on line-height of .option__label, which does not fit completely to layout */ min-height: var(--option-min-height, var(--syn-input-height-medium)); padding: var(--option-padding, var(--syn-spacing-small) var(--syn-spacing-medium)); } .option:not(.option--current) { color: var(--syn-color-neutral-950); } /** #429: Use token for opacity */ .option--disabled { opacity: var(--syn-input-disabled-opacity); } .option__label { line-height: var(--syn-line-height-normal); } .option__check { color: var(--syn-color-primary-600); font-size: var(--option-icon-size, var(--syn-spacing-large)); } .option .option__check { padding-inline-end: var(--syn-spacing-small); } /* Invert the check mark when keyboard navigation is used */ .option--current .option__check { color: var(--syn-color-neutral-0); } /* Use larger spacing between icons and content */ .option__prefix::slotted(*) { margin-inline-end: var(--syn-spacing-small); } .option__suffix::slotted(*) { margin-inline-start: var(--syn-spacing-small); } /* Set correct icon size when someone uses syn-icon in the slots */ .option__prefix::slotted(syn-icon), .option__suffix::slotted(syn-icon) { color: var(--syn-color-neutral-800); font-size: var(--option-icon-size, var(--syn-spacing-large)); } .option--current .option__prefix::slotted(syn-icon), .option--current .option__suffix::slotted(syn-icon) { color: var(--syn-color-neutral-0); } /* This is needed for the highlight styling of the options in syn-combobox */ .option__label::slotted(.syn-highlight-style) { background-color: transparent; color: var(--syn-color-neutral-950); font: var(--syn-body-medium-bold); } :host([aria-selected='true']) .option__label::slotted(.syn-highlight-style) { color: var(--syn-color-neutral-0); } `; export { option_custom_styles_default }; //# sourceMappingURL=chunk.G3KRSXVI.js.map