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

fix(dropdown)!: change display to inline-block to ease truncation setup #8253

Merged
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 @@ -58,7 +58,7 @@ describe("calcite-dropdown", () => {
});

describe("renders", () => {
renders(simpleDropdownHTML, { display: "inline-flex" });
renders(simpleDropdownHTML, { display: "inline-block" });
});

describe("honors hidden attribute", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

:host {
@apply inline-flex flex-initial;
@apply inline-block flex-initial;
}

@include disabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,3 +462,21 @@ export const triggerWordBreak_TestOnly = (): string => html`<div style="width:30
</calcite-dropdown-group>
</calcite-dropdown>
</div>`;

export const settingFullWidthEnablesTriggerTruncation_TestOnly = (): string => html`<div
style="width: 300px; border: solid"
>
<calcite-dropdown style="width: 100%;">
<calcite-button width="full" slot="trigger"
>This is some really long text that will eventually overrun the container</calcite-button
>
<calcite-dropdown-group group-title="Natural places">
<calcite-dropdown-item>Mountain</calcite-dropdown-item>
<calcite-dropdown-item>River</calcite-dropdown-item>
<calcite-dropdown-item>Waterfall</calcite-dropdown-item>
<calcite-dropdown-item>Rainforest</calcite-dropdown-item>
<calcite-dropdown-item>Tundra</calcite-dropdown-item>
<calcite-dropdown-item>Desert</calcite-dropdown-item>
</calcite-dropdown-group>
</calcite-dropdown>
</div>`;