Create positioning context for 3 column layout #140
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.
Gutenberg 18.5 added
position:relative
to all constrained blocks, breaking the 3 column layout.I have gone for adjusting the top spacing, but also making the layout less brittle by defining it's own positioning context, and adjusting the position of the children accordingly. It has resulted in just as many changes across the site as if we had unset the relative position everywhere, but I think the end result is simpler, less brittle and moves Documentation forward in terms of redesign.
See #139
Props @ryelle
How to test the changes in this Pull Request:
Probably easiest to load WordPress/wporg-developer#522 and WordPress/wporg-documentation-2022#97 in sandbox with this and WordPress/wporg-mu-plugins#624
Test the sidebar container position on load and scrolling down. Test a page with a long ToC where it comes into contact with the footer, and check that the height of the sidebar is reduced to avoid overlap.