Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(split-button): Make dividers consistent #9298

Merged
merged 7 commits into from
May 14, 2024

Conversation

josercarcamo
Copy link
Contributor

Related Issue: #8142

Summary

Made the dividers look consistent for all split button appearances.

@josercarcamo josercarcamo requested a review from a team as a code owner May 9, 2024 20:47
@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label May 9, 2024
@josercarcamo josercarcamo added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label May 9, 2024
@@ -98,6 +98,7 @@
:host([appearance="outline"]) {
.divider-container {
border-block: 1px solid var(--calcite-split-button-divider);
background-color: initial;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The divider container's background-color is set via custom CSS prop, so could you try updating --calcite-split-button-background instead of overriding here? It looks like it should be transparent for both outline and outline-fill appearance types.

@@ -64,16 +64,19 @@
:host([appearance="outline-fill"]) {
&:host([kind="brand"]) {
--calcite-split-button-divider: theme("colors.brand");
--calcite-split-button-background: transparent;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the same value is applied regardless of kind, can you look at moving this declaration one level up?

:host([appearance="outline"]),
:host([appearance="outline-fill"]) {
  --calcite-split-button-background: transparent;

  &:host[kind="brand"]) {
    --calcite-split-button-divider: theme("colors.brand");
  }
  /* ... */

Also, this block overrides these styles, so we can probably remove the overridden ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of specificity, I can't factor out this line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. Disregard my comment then. Same with the disabled styling one below.

Sidebar: I think we could refactor this to simplify styles.

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@josercarcamo josercarcamo removed the pr ready for visual snapshots Adding this label will run visual snapshot testing. label May 14, 2024
@josercarcamo josercarcamo added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label May 14, 2024
@josercarcamo josercarcamo added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 14, 2024
@josercarcamo josercarcamo merged commit 2fa432d into main May 14, 2024
13 checks passed
@josercarcamo josercarcamo deleted the josercarcamo/8142-split-button-consistent-dividers branch May 14, 2024 01:59
@josercarcamo josercarcamo restored the josercarcamo/8142-split-button-consistent-dividers branch May 22, 2024 22:16
josercarcamo added a commit that referenced this pull request May 23, 2024
**Related Issue:** #8142

## Summary
This is to address a case missed in #9298: Fixed background color anomoly when the background of :root is set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants