-
Notifications
You must be signed in to change notification settings - Fork 77
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(panel): control panel header action tokens #11300
base: dev
Are you sure you want to change the base?
Conversation
The alternative is for the user to reset actions in the CSS cascade calcite-panel {
--calcite-panel-header-background-color: #004874;
--calcite-panel-heading-text-color: #fff;
--calcite-action-background-color: #004874;
--calcite-action-background-color-hover: #023452;
--calcite-action-background-color-pressed: #023452;
--calcite-action-text-color: #fff;
--calcite-action-text-color-hover: #fff;
--calcite-action-text-color-pressed: #fff;
.panel-body {
--calcite-action-background-color: initial;
--calcite-action-background-color-hover: initial;
--calcite-action-background-color-pressed: initial;
--calcite-action-text-color: intial;
--calcite-action-text-color-hover: initial;
--calcite-action-text-color-pressed: initial;
}
} |
@@ -26,6 +26,15 @@ | |||
* @prop --calcite-panel-content-space: [Deprecated] Use `--calcite-panel-space` instead. Specifies the padding of the component's content. | |||
* @prop --calcite-panel-footer-padding: [Deprecated] Use `--calcite-panel-footer-space` instead. Specifies the padding of the component's footer. | |||
* @prop --calcite-panel-header-border-block-end: [Deprecated] Use `--calcite-panel-border-color` instead. Specifies the component header's block end border. | |||
|
|||
* @prop --calcite-panel-header-action-menu-items-space: Specifies the space between actions in the header's action menu. | |||
* @prop --calcite-panel-header-action-background-color-hover: Specifies the background color of the component's `calcite-action` items in the panel header when hovered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a double space here inbetween items in
. Applies to multiple lines here.
@@ -147,6 +156,26 @@ | |||
margin-inline-end: auto; | |||
justify-content: center; | |||
|
|||
.header-actions { | |||
--calcite-action-menu-items-space: var(--calcite-panel-header-action-menu-items-space, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the 0
is needed here as its the default in the action-menu.scss
. right?
My concern is that the 0
within the action-menu
should be the source of truth. If action-menu changes to something other than 0 then how would we know to update this as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applies to other fallback defaults below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is a public prop on Action Menu - I'm not sure the history there (or if needed on that component), but I don't know if this needs to be added here - I think just the color ones are good for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple q about potentially unneeded pass-through-props, but the color ones look good to me.
* @prop --calcite-panel-header-action-background-color-hover: Specifies the background color of the component's `calcite-action` items in the panel header when hovered. | ||
* @prop --calcite-panel-header-action-background-color-press: Specifies the background color of the component's `calcite-action` items in the panel header when pressed. | ||
* @prop --calcite-panel-header-action-background-color: Specifies the background color of the component's `calcite-action` items in the panel header. | ||
* @prop --calcite-panel-header-action-corner-radius: Specifies the corner radius of the component's `calcite-action` items in the panel header. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one might not be needed?
Summary
Per discussion on Teams. Allows the action menu in panel header shadowDom to be controlled separately from other tokens without a reset per customer request.
Adds Tokens
--calcite-panel-header-action-menu-items-space: Specifies the space between actions in the header's action menu.
--calcite-panel-header-action-background-color-hover: Specifies the background color of the component's
calcite-action
items in the panel header when hovered.--calcite-panel-header-action-background-color-press: Specifies the background color of the component's
calcite-action
items in the panel header when pressed.--calcite-panel-header-action-background-color: Specifies the background color of the component's
calcite-action
items in the panel header.--calcite-panel-header-action-corner-radius: Specifies the corner radius of the component's
calcite-action
items in the panel header.--calcite-panel-header-action-indicator-color: Specifies the color of the component's
calcite-action
items' indicator in the panel header.--calcite-panel-header-action-text-color-press: Specifies the text color of the component's
calcite-action
items in the panel header when pressed.--calcite-panel-header-action-text-color: Specifies the text color of the component's
calcite-action
items in the panel header.