fix: avoid extra scrollbar when having no appbar or sidebar#477
Merged
maartenbreddels merged 2 commits intomasterfrom Feb 23, 2024
Merged
fix: avoid extra scrollbar when having no appbar or sidebar#477maartenbreddels merged 2 commits intomasterfrom
maartenbreddels merged 2 commits intomasterfrom
Conversation
This issue was introduced in 3884d6a and was caused by a full height 100% chain and a single element with padding, causing the solara-autorouter-content to be pushed down and creating scrollbars on its parents. If instead, we add the scrollbar to the solara-autorouter-content element, we can avoid this issue.
solara/server/assets/style.css
Outdated
|
|
||
| .solara-autorouter-content { | ||
| height: 100%; | ||
| overflow: auto; |
Collaborator
Collaborator
There was a problem hiding this comment.
The cause seems to be the fact that the 8px margins on the Card, together with height/width 100% push it beyond the bounds of the element containing it...
Actually, taking a better look at this, it seems to be caused by a margin of -12px from .row, in this case specifically the one that also has .solara-page-content-search.
Collaborator
Collaborator
|
A soft way to solve this would be to add some conditionality to the .row.solara-content-main{
margin: 0;
}
.row.solara-autorouter-content{
margin: 0;
}Another approach would be to override the margins alltogether div.row{ /* add div for specificity */
margin: 0;
} |
Setting height: 100% can still get bigger than 100% by it's content, using max-height fixes this.
Contributor
Author
|
Magic fix by Mario ! :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This issue was introduced in 3884d6a and was caused by a full height 100% chain and a single element with padding, causing the solara-autorouter-content to be pushed down and creating scrollbars on its parents.
If instead, we add the scrollbar to the solara-autorouter-content element, we can avoid this issue.
See

where the anonymous div is causing scrollbars, and the solara-autorouter-content causes overflow.
The v-input has a top-margin of 4, triggering this.
After this fix, we don't see overflow and scrollbars:
