Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@

.position-container {
@include floating-ui-container();

& {
max-inline-size: var(--calcite-popover-max-size-x, 100vw);
}
max-inline-size: var(--calcite-popover-max-size-x, 100vw);
}

@include floating-ui-elem-anim(".position-container");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,10 @@ describe("calcite-tooltip", () => {
shadowSelector: `.${CSS.positionContainer}`,
targetProp: "zIndex",
},
"--calcite-tooltip-max-size-x": {
shadowSelector: `.${CSS.positionContainer}`,
targetProp: "maxInlineSize",
},
},
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @prop --calcite-tooltip-background-color: Specifies the component's background color.
* @prop --calcite-tooltip-border-color: Specifies the component's border color.
* @prop --calcite-tooltip-corner-radius: Specifies the component's corner radius.
* @prop --calcite-tooltip-max-size-x: Specifies the component's maximum width.
* @prop --calcite-tooltip-text-color: Specifies the component's text color.
* @prop --calcite-tooltip-z-index: Specifies the z-index value for the component.
*/
Expand All @@ -17,6 +18,8 @@

.position-container {
@include floating-ui-container();
max-inline-size: var(--calcite-tooltip-max-size-x, 20rem);
max-block-size: 20rem;
}

@include floating-ui-elem-anim(".position-container");
Expand All @@ -29,11 +32,10 @@
overflow-hidden
py-3
px-4
font-medium;
font-medium
word-break;
border-radius: var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));
color: var(--calcite-tooltip-text-color, var(--calcite-color-text-1));
max-inline-size: 20rem;
max-block-size: 20rem;
text-align: start;
}

Expand Down
1 change: 1 addition & 0 deletions packages/calcite-components/src/custom-theme/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const tooltipTokens = {
calciteTooltipBackgroundColor: "",
calciteTooltipBorderColor: "",
calciteTooltipCornerRadius: "",
calciteTooltipMaxSizeX: "",
calciteTooltipTextColor: "",
calciteTooltipZIndex: "",
};
Expand Down
Loading