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(tabs, tab, tab-title, tab-nav): update component tokens #10579

Draft
wants to merge 2 commits into
base: jcfranco/7180-add-tabs-component-tokens
Choose a base branch
from

Conversation

alisonailea
Copy link
Contributor

Related Issue: #7180

Summary

Tabs

--calcite-tab-background-color: Specifies background color of the component.
--calcite-tab-border-color: Specifies border color of the component.

Tab Title

--calcite-tab-text-color: Specifies the component's text color.
--calcite-tab-border-color: Specifies the component's border color.
--calcite-tab-background-color: Specifies the component's background color.
--calcite-accent-color: Specifies the component's accent color.
--calcite-accent-color-hover: Specifies the component's accent color when hovered.
--calcite-accent-color-press: Specifies the component's accent color when selected or active.
--calcite-tab-icon-start-color: Specifies the component's start icon color. Fallback to --calcite-icon-color or current color.
--calcite-tab-icon-end-color: Specifies the component's end icon color. Fallback to --calcite-icon-color or current color.
--calcite-close-icon-color: Specifies the color of the close icon.
--calcite-close-icon-color-press: Specifies the color of the close icon when interacted with.
--calcite-close-background-color: Specifies the background color of the close icon.
--calcite-close-background-color-press: Specifies the background color of the close icon when interacted with.

Tab

--calcite-tab-content-space-y: Specifies the vertical space between the component's content in the default slot.

Deprecates

--calcite-tab-content-block-padding: [Deprecated] Use --calcite-tab-content-space-y instead. Specifies the block padding of the component's content in the default slot.

Tab Nav

--calcite-tab-background-color: Specifies background color of the component.
--calcite-tab-border-color: Specifies border color of the component. Used for "bordered" tabs.
--calcite-tab-text-color: Specifies the icon and text color of the component.

@@ -3,39 +3,20 @@
*
* These properties can be overridden using the component's tag as selector.
*
* @prop --calcite-tab-accent-color-hover: Specifies the component's accent color when hovered.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

None of these are used in this component so I don't think these parts should be included in the doc.

@alisonailea
Copy link
Contributor Author

alisonailea commented Oct 22, 2024

An example implementation given the above code would go as follows...

calcite-tabs.my-override {
  --calcite-tab-background-color: red;
  --calcite-tab-text-color: white;
  --calcite-tab-border-color: green;
  --calcite-accent-color: transparent;
  --calcite-accent-color-hover: lightblue;
  --calcite-accent-color-press: purple;
  --calcite-icon-color: black;
  --calcite-close-background-color: transparent;
  --calcite-close-background-color-press: var(--calcite-color-transparent-press);
  --calcite-close-icon-color: black;
  --calcite-close-icon-color-press: darkgrey;

  *[selected] {
    --calcite-tab-icon-start-color: grey;
    --calcite-tab-icon-end-color: darkblue;
  }
 
  *[bordered] {
    &:hover {
      --calcite-tab-background-color: darkred;
    }
    &:active {
      --calcite-tab-background-color: white;
       --calcite-tab-text-color: red;
    }
  }
}

Copy link
Contributor

github-actions bot commented Nov 1, 2024

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Nov 1, 2024
@alisonailea alisonailea removed the Stale Issues or pull requests that have not had recent activity. label Nov 25, 2024
Copy link
Contributor

github-actions bot commented Dec 3, 2024

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Issues or pull requests that have not had recent activity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant