WordPress / wporg-parent-2021

17 stars 10 forks source link

Table of contents sidebar is too far down the page #139

Closed ryelle closed 2 months ago

ryelle commented 3 months ago

When scrolled to the top of the page, the table of contents sidebar is too far offset.

Screen Shot 2024-06-07 at 17 00 25

This seems to be new with the Gutenberg update, because constrained blocks now get position:relative https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/group/style.scss#L6

I'm not sure if we should unset the position:relative or adjust the top spacing on the sidebar.

adamwoodnz commented 2 months ago

This seems to be new with the Gutenberg update, because constrained blocks now get position:relative https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/group/style.scss#L6

I'm not sure if we should unset the position:relative or adjust the top spacing on the sidebar.

Agreed that this is the root cause. Transferring this to Parent where I think we should set the .has-three-columns class to position: relative so that we have more control over the layout from that parent node. This will require changes in the sidebar container block too, and possibly changes in the consuming themes.

ryelle commented 2 months ago

@adamwoodnz Is there anything else to wrap up for this issue?

adamwoodnz commented 2 months ago

Nope, we're done!