I'm not sure if we should unset the position:relative or adjust the top spacing on the sidebar.
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.
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.
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 https://github.com/WordPress/wporg-parent-2021/issues/139
Props @ryelle
How to test the changes in this Pull Request:
Probably easiest to load https://github.com/WordPress/wporg-developer/pull/522 and https://github.com/WordPress/wporg-documentation-2022/pull/97 in sandbox with this and https://github.com/WordPress/wporg-mu-plugins/pull/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.