@synergy-design-system/components
Version:
72 lines (61 loc) • 2.68 kB
JavaScript
// src/components/button/button-group.styles.ts
import { css } from "lit";
var button_group_styles_default = css`
/* stylelint-disable no-descending-specificity */
/*
* Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).
* This means buttons aren't always direct descendants of the button group, thus we can't target them with the
* ::slotted selector. To work around this, the button group component does some magic to add these special classes to
* buttons and we style them here instead.
*/
:host([data-syn-button-group__button--first]:not([data-syn-button-group__button--last])) .button {
border-end-end-radius: 0;
border-start-end-radius: 0;
}
:host([data-syn-button-group__button--inner]) .button {
border-radius: 0;
}
:host([data-syn-button-group__button--last]:not([data-syn-button-group__button--first])) .button {
border-end-start-radius: 0;
border-start-start-radius: 0;
}
/* All except the first */
:host([data-syn-button-group__button]:not([data-syn-button-group__button--first])) {
margin-inline-start: calc(-1 * var(--syn-input-border-width));
}
/* Add a visual separator between solid buttons */
:host([data-syn-button-group__button]:not([data-syn-button-group__button--first]):not([data-syn-button-group__button--radio]):not([variant='filled']):not(:hover)) .button::after {
border-left: solid 1px rgb(128 128 128 / 33%);
bottom: 0;
content: '';
inset-inline-start: 0;
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
mix-blend-mode: multiply;
position: absolute;
top: 0;
}
/* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
:host([data-syn-button-group__button--hover]) {
z-index: 1;
}
/* Focus and checked are always on top */
:host([data-syn-button-group__button--focus]),
:host([data-syn-button-group__button][checked]) {
z-index: 2;
}
/* #392: Button Groups */
:host([data-syn-button-group__button--inner]) .button--filled.button {
border-left-color: var(--syn-panel-background-color);
border-right-color: var(--syn-panel-background-color);
}
:host([data-syn-button-group__button--first]:not([data-syn-button-group__button--last])) .button--filled.button {
border-right-color: var(--syn-panel-background-color);
}
:host([data-syn-button-group__button--last]:not([data-syn-button-group__button--first])) .button--filled.button {
border-left-color: var(--syn-panel-background-color);
}
`;
export {
button_group_styles_default
};
//# sourceMappingURL=chunk.GGTG64MT.js.map