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(styles): prevent overflow for TwoColumnPanel left container at narrow viewports #1234

Merged
merged 2 commits into from
Oct 11, 2023
Merged
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
7 changes: 6 additions & 1 deletion packages/styles/two-column-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,12 @@

.TwoColumnPanel--hide .TwoColumnPanel__Left,
.TwoColumnPanel--show .TwoColumnPanel__Left {
margin-left: calc(var(--two-column-panel-left-column-width) * -1);
max-width: 100%;
/* This will constrain the component to the max-width of its container, as well as adjusting the offset margin to the max negative value to prevent incorrect offset when the max-width is less than the column width. */
margin-left: max(
calc(var(--two-column-panel-left-column-width) * -1),
calc(100% * -1)
);
animation: none;
opacity: 1;
}
Expand Down