Fix overflowing menu bar on admin sections #527
Merged
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 addresses an issue raised in silverstripe/silverstripe-comments#243 and #498 where the menu at the top of the admin screen extends into the preview when in split mode.
This is caused by the whole content section having content that is larger than the container. The blocks do not flex-shrink in some browsers due to a quirk where they need a width or min-width set low enough to indicate the block width can be shrunk to less than the width of the content in it. This happens when there's an inflexible block (the page tree in this case). Here's some relevant SO questions I dug up trying to diagnose the issue:
https://stackoverflow.com/questions/38723559/flex-item-exceeds-its-container
https://stackoverflow.com/questions/33790219/firefox-not-respecting-flex-shrink
The change affects all blocks with the class
flexbox-area-grow
but it should only change any block that has overflowing content. In testing I couldn't identify any other block with this class that was negatively affected.