Skip to content

Commit

Permalink
[ButtonGroup] Consolidate se23 styles
Browse files Browse the repository at this point in the history
  • Loading branch information
laurkim committed Aug 15, 2023
1 parent eec2e4a commit 7df8453
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions polaris-react/src/components/ButtonGroup/ButtonGroup.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../../styles/common';

.ButtonGroup {
// stylelint-disable -- Polaris component custom properties
// stylelint-disable -- ButtonGroup custom properties
--pc-button-group-item: 10;
--pc-button-group-focused: 20;
// stylelint-enable
Expand All @@ -19,11 +19,7 @@

.Item-plain {
&:not(:first-child) {
margin-left: var(--p-space-4);

#{$se23} & {
margin-left: var(--p-space-2);
}
margin-left: var(--p-space-2);
}

&:not(:last-child) {
Expand All @@ -39,31 +35,24 @@

.Item {
position: relative;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
z-index: var(--pc-button-group-item);
// stylelint-disable-next-line polaris/z-index/declaration-property-value-allowed-list -- override z-index
z-index: unset;
margin-top: 0;
margin-left: 0;
line-height: normal;

#{$se23} & {
// stylelint-disable-next-line polaris/z-index/declaration-property-value-allowed-list -- se23 temporary styles
z-index: unset;
}

&:not(:first-child) {
margin-left: calc(-1 * var(--p-space-025));
}

// stylelint-disable-next-line -- se23 specific styling
// stylelint-disable-next-line -- set clip path
+ .Item:not(.selected) > button {
#{$se23} & {
clip-path: inset(0 0 0 var(--p-space-025));
}
clip-path: inset(0 0 0 var(--p-space-025));
}
}

.Item-focused {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
// stylelint-disable-next-line -- custom property
z-index: var(--pc-button-group-focused);
}
}
Expand Down

0 comments on commit 7df8453

Please sign in to comment.