Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create positioning context for 3 column layout #140

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

adamwoodnz
Copy link
Contributor

@adamwoodnz adamwoodnz commented Jun 10, 2024

Gutenberg 18.5 added position:relative to all constrained blocks, breaking the 3 column layout.

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.

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.

Gutenberg 18.5 added position:relative to all constrained blocks, breaking the 3 column layout.
This change adds makes the layout less brittle by defining it's own positioning context, and adjusts position of the children accordingly.

See #139
Copy link
Contributor

@ryelle ryelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for setting position:relative here, can guard against any future core changes.

Tested and good in developer & docs.

@adamwoodnz adamwoodnz merged commit 510f60c into trunk Jun 11, 2024
@adamwoodnz adamwoodnz deleted the fix/139-toc-position-gutenberg-18-5 branch June 11, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Theme Templates, patterns, CSS
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants