Skip to content

Commit

Permalink
refactor(split-button): simplify styles (#9326)
Browse files Browse the repository at this point in the history
**Related Issue:** N/A

## Summary

✨🧹✨

---------

Co-authored-by: Jose Carcamo <jcarcamo@esri.com>
Co-authored-by: Jose Carcamo <138070439+josercarcamo@users.noreply.github.com>
  • Loading branch information
3 people committed May 20, 2024
1 parent 88b793e commit 96bdfa6
Showing 1 changed file with 20 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,45 @@
@apply w-full;
}

:host {
&:host([kind="brand"]) {
--calcite-split-button-background: theme("colors.brand");
--calcite-split-button-divider: theme("colors.background.foreground.1");
}
&:host([kind="danger"]) {
--calcite-split-button-background: theme("colors.danger");
--calcite-split-button-divider: theme("colors.background.foreground.1");
}
&:host([kind="neutral"]) {
--calcite-split-button-background: theme("colors.background.foreground.3");
--calcite-split-button-divider: theme("colors.color.1");
}
&:host([kind="inverse"]) {
--calcite-split-button-background: var(--calcite-color-inverse);
--calcite-split-button-divider: theme("colors.background.foreground.1");
}
:host([kind="brand"]) {
--calcite-split-button-background: theme("colors.brand");
--calcite-split-button-divider: theme("colors.background.foreground.1");
}

:host([kind="danger"]) {
--calcite-split-button-background: theme("colors.danger");
--calcite-split-button-divider: theme("colors.background.foreground.1");
}

:host([kind="neutral"]) {
--calcite-split-button-background: theme("colors.background.foreground.3");
--calcite-split-button-divider: theme("colors.color.1");
}

:host([kind="inverse"]) {
--calcite-split-button-background: var(--calcite-color-inverse);
--calcite-split-button-divider: theme("colors.background.foreground.1");
}

:host([appearance="transparent"]) {
--calcite-split-button-background: transparent;
&:host([kind="brand"]) {
--calcite-split-button-divider: theme("colors.brand");
--calcite-split-button-background: transparent;
}
&:host([kind="danger"]) {
--calcite-split-button-divider: theme("colors.danger");
--calcite-split-button-background: transparent;
}
&:host([kind="neutral"]) {
--calcite-split-button-divider: theme("colors.color.1");
--calcite-split-button-background: transparent;
}
&:host([kind="inverse"]) {
--calcite-split-button-divider: theme("colors.background.foreground.1");
--calcite-split-button-background: transparent;
}
}

:host([appearance="outline"]),
:host([appearance="outline-fill"]) {
&:host([kind="brand"]),
&:host([kind="danger"]),
&:host([kind="neutral"]),
&:host([kind="inverse"]) {
--calcite-split-button-background: transparent;
}
--calcite-split-button-background: transparent;
&:host([kind="brand"]) {
--calcite-split-button-divider: theme("colors.brand");
}
Expand Down Expand Up @@ -125,12 +118,6 @@
calcite-dropdown > calcite-button {
@apply pointer-events-none;
}
&:host([appearance="outline-fill"]),
&:host([appearance="outline"]) {
.divider-container {
background-color: transparent;
}
}
}

@include base-component();

0 comments on commit 96bdfa6

Please sign in to comment.