feat(popover): add component tokens#8642
feat(popover): add component tokens#8642Elijbet merged 16 commits intoepic/7180-component-tokensfrom
Conversation
…nent-tokens-for-popover
…nent-tokens-for-popover
…nent-tokens-for-popover
|
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. |
| * @prop --calcite-popover-border-color: The border color of the component. | ||
| * @prop --calcite-popover-corner-radius: The start end border radius of the component. | ||
| * @prop --calcite-popover-text-color: The text color of the component. | ||
| * @prop --calcite-popover-z-index: Sets the z-index value for the component. |
There was a problem hiding this comment.
My mistake here. We're keeping z-index an -internal- variable for now.
| */ | ||
|
|
||
| :host { | ||
| --calcite-floating-ui-z-index: var(--calcite-popover-z-index, theme("zIndex.popover")); |
There was a problem hiding this comment.
Related to above. This can be replaced with the following,
--calcite-floating-ui-z-index: var(--calcite-z-index-popup);
alisonailea
left a comment
There was a problem hiding this comment.
One small thing for non-breaking changes on the z-index. Looks good 🎉
|
|
||
| :host { | ||
| --calcite-floating-ui-z-index: var(--calcite-popover-z-index, theme("zIndex.popover")); | ||
| --calcite-floating-ui-z-index: var(--calcite-z-index-popup); |
There was a problem hiding this comment.
for non-breaking changes I just realized this should be
--calcite-floating-ui-z-index: var(--calcite-popover-z-index, var(--calcite-z-index-popup));
|
@Elijbet @alisonailea shouldn't these be converted to tokens? :host([scale="s"]) {
.heading {
@apply text-n1-wrap
px-3
py-2;
}
}
:host([scale="m"]) {
.heading {
@apply text-0-wrap
px-4
py-3;
}
}
:host([scale="l"]) {
.heading {
@apply text-1-wrap
px-5
py-4;
}
} |
No. We don't want to expose font size and padding as component tokens in most cases at the moment. |
|
What about border width? or height? |
|
Should we add a story for testing this? I notice the popover tail isn't being themed properly. |
Related Issue: #7180
Summary
Adds the following component tokens: