diff --git a/packages/calcite-components/src/components/split-button/split-button.scss b/packages/calcite-components/src/components/split-button/split-button.scss
index 4ae15eae7cf..c6e9a3b94ae 100644
--- a/packages/calcite-components/src/components/split-button/split-button.scss
+++ b/packages/calcite-components/src/components/split-button/split-button.scss
@@ -2,13 +2,16 @@
@apply inline-block;
}
-:host {
- .split-button__container {
- @apply flex items-stretch;
- > calcite-dropdown > calcite-button {
- @apply h-full align-top;
- }
- }
+:host([width="auto"]) {
+ @apply w-auto;
+}
+
+:host([width="half"]) {
+ @apply w-2/4;
+}
+
+:host([width="full"]) {
+ @apply w-full;
}
:host {
@@ -74,41 +77,36 @@
}
}
-.width-auto {
- @apply w-auto;
-}
-
-.width-half {
- @apply w-1/2;
-}
-
-.width-full {
- @apply w-full;
+.container {
+ @apply flex items-stretch;
+ > calcite-dropdown > calcite-button {
+ @apply h-full align-top;
+ }
}
-.split-button__divider-container {
+.divider-container {
@apply transition-default flex w-px items-stretch;
background-color: var(--calcite-split-button-background);
}
-.split-button__divider {
+.divider {
@apply my-1 inline-block w-px;
background-color: var(--calcite-split-button-divider);
}
:host([appearance="outline-fill"]),
:host([appearance="outline"]) {
- .split-button__divider-container {
+ .divider-container {
border-block: 1px solid var(--calcite-split-button-divider);
}
- &:hover .split-button__divider-container {
+ &:hover .divider-container {
background-color: var(--calcite-split-button-divider);
}
}
:host([appearance="outline-fill"]:hover),
:host([appearance="outline"]:hover) {
- .split-button__divider-container {
+ .divider-container {
background-color: var(--calcite-split-button-divider);
}
}
@@ -121,13 +119,13 @@
&:host([kind="danger"]) {
--calcite-split-button-divider: theme("colors.danger-press");
}
- .split-button__divider-container {
+ .divider-container {
background-color: var(--calcite-split-button-divider);
}
}
@include disabled() {
- .split-button__divider-container {
+ .divider-container {
@apply opacity-disabled;
}
diff --git a/packages/calcite-components/src/components/split-button/split-button.stories.ts b/packages/calcite-components/src/components/split-button/split-button.stories.ts
index 0fad58fcf40..45653547fef 100644
--- a/packages/calcite-components/src/components/split-button/split-button.stories.ts
+++ b/packages/calcite-components/src/components/split-button/split-button.stories.ts
@@ -37,6 +37,41 @@ export const simple = (): string => html`
`;
+export const allWidths_TestOnly = (): string => html`
+
+
+
+ Pea
+ Parsnip
+ Radish
+ Tomato
+ Rutabaga
+ Bean
+
+
+
+
+ Pea
+ Parsnip
+ Radish
+ Tomato
+ Rutabaga
+ Bean
+
+
+
+
+ Pea
+ Parsnip
+ Radish
+ Tomato
+ Rutabaga
+ Bean
+
+
+
+`;
+
export const iconEnd_TestOnly = (): string => html`