-
Notifications
You must be signed in to change notification settings - Fork 300
fix(dialog-box): [dialog-box] right pop-up window height style issue #2844
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,7 +182,8 @@ | |
overflow: auto; | ||
color: var(--tv-DialogBox-drawer-body-color); | ||
border-bottom: 1px solid var(--tv-DialogBox-drawer-divider-border-color); | ||
padding: 0 var(--tv-DialogBox-padding); | ||
padding: var(--tv-DialogBox-vertical-padding) var(--tv-DialogBox-padding); | ||
max-height: 100vh; | ||
Comment on lines
+185
to
+186
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider a more robust height calculation approach. While the padding changes look good, setting
Consider this alternative approach: .@{dialog-box-prefix-cls}__body {
flex: 1;
overflow: auto;
color: var(--tv-DialogBox-drawer-body-color);
border-bottom: 1px solid var(--tv-DialogBox-drawer-divider-border-color);
padding: var(--tv-DialogBox-vertical-padding) var(--tv-DialogBox-padding);
- max-height: 100vh;
+ max-height: calc(100vh - var(--tv-DialogBox-padding) * 2 - var(--tv-DialogBox-header-height) - var(--tv-DialogBox-footer-height));
+ /* Add a CSS variable for dynamic viewport height support */
+ max-height: calc(100dvh - var(--tv-DialogBox-padding) * 2 - var(--tv-DialogBox-header-height) - var(--tv-DialogBox-footer-height));
} This change:
Note: You'll need to define the header and footer height variables in your
|
||
} | ||
|
||
.@{dialog-box-prefix-cls}__footer { | ||
|
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.
Ensure that the
max-height: 100vh;
does not interfere with any dynamic content that might exceed this height, as it could lead to content being cut off or inaccessible.