Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified packages/components/button/__screenshots__/04-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/components/button/__screenshots__/04-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 42 additions & 2 deletions packages/components/button/button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,55 @@
.kbq-button-group {
&.kbq-button-group_horizontal {
@include groups-mixins.group(':is(.kbq-button, .kbq-button-icon)');

& > :is(.kbq-button, .kbq-button-icon):not(:last-child, .cdk-keyboard-focused) {
border-right-color: transparent;
}
}

&.kbq-button-group_vertical {
@include groups-mixins.vertical-group(':is(.kbq-button, .kbq-button-icon)');

& > :is(.kbq-button, .kbq-button-icon):not(:last-child, .cdk-keyboard-focused) {
border-bottom-color: transparent;
}
}

&:not(:has(> :not(.kbq-contrast-fade.kbq-button_filled))),
&:not(:has(> :not(.kbq-contrast.kbq-button_filled))) {
// @TODO tech debt (#DS-4847)
gap: var(--kbq-size-3xs);
:is(.kbq-button, .kbq-button-icon) {
background-clip: padding-box !important;
}
}

&.kbq-contrast-fade.kbq-button-group-root_filled {
// internal css variable, so don't prefixed with kbq
--button-group-divider-color: var(--kbq-line-contrast-fade);

&.kbq-button-group_horizontal {
:is(.kbq-button, .kbq-button-icon):not(:first-child)::before {
content: '';
position: absolute;
// offset by -1px because absolute positioning is relative to the padding edge,
// but the visual junction sits 1px to the left in the transparent border area
left: calc(-1 * var(--kbq-size-border-width));
top: 0;
bottom: 0;
width: var(--kbq-size-border-width);
background: var(--button-group-divider-color);
Comment thread
NikGurev marked this conversation as resolved.
}
}

&.kbq-button-group_vertical {
:is(.kbq-button, .kbq-button-icon):not(:first-child)::before {
content: '';
position: absolute;
top: calc(-1 * var(--kbq-size-border-width));
left: 0;
right: 0;
height: var(--kbq-size-border-width);
background: var(--button-group-divider-color);
}
Comment thread
NikGurev marked this conversation as resolved.
}
}
}
2 changes: 1 addition & 1 deletion packages/components/button/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class E2eButtonStateAndStyle {
}
<tr>
<td>
<div class="layout-gap-3xs" kbq-button-group [kbqStyle]="style" [color]="color">
<div kbq-button-group [kbqStyle]="style" [color]="color">
<button kbq-button>
<i kbq-icon="kbq-diamond_16"></i>
{{ data[0] }}
Expand Down