-
Notifications
You must be signed in to change notification settings - Fork 361
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
[Livro] Fix wide and full width content in index/archive/home templates #5385
Conversation
Oh yeah, it's broken on the site editor for me too. Regarding the content shifting on the archive template, I think it's related to the post-content no longer getting the |
ae2e534
to
424c4de
Compare
Struggling to get this to work because there is an extra wrapping div output in the site editor post content block:
Will need to look upstream / open a PR because I'm not sure why that extra div is there. Also, is this our first theme that uses the |
Yes, I think it is. |
I spent a long time looking into this today and have a fix but I don't think it's done properly. In the meantime I suggest we merge this. |
is the spacing bug caused by gap because of the extra div? maybe we can counter that with margin or some CSS? |
I think the way to fix the space is to ensure that all templates have the same levels of nesting so that they behave in the same way with respect to block gaps. I've added a commit to do this in the There are a couple of other things we could do to improve these templates:
I'll add separate commits for each of these changes so you can remove them if you don't agree and also to make it easier to review. |
c48389e
to
1d7048b
Compare
I think this ready for another review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what I see:
Post editor | Site editor | Front-end |
---|---|---|
I see that the spacing bug that was introduced in this PR is fixed. It looks like there's a regression in the single template for the default alignment because of the max-width being unset.
However when I remove that rule (), it still looks broken in the post editor because our left-right margin CSS is overriding the auto rules that would center the block:max-width: unset
D'oh! Hopefully my latest commit fixes this. I didn't see the issue with the post editor... |
Hmm I still get the same result as the last screenshots I shared, after pulling down your latest commit. That said, I think the templates are cleaner, so if there's no visual difference between this and trunk, I'm fine with the change. |
In the home template too? |
Can you share the post markup you're testing with? I've been working from pcrugM-lB-p2 |
Yes.
|
The extra div is removed now, so we should be able to get this working in the site editor too: WordPress/gutenberg#38451 |
Changes proposed in this Pull Request:
This PR changes where layout is inherited in certain templates, so that wide and full width content appears as expected. To test, create a recent post with wide and full width content, and ensure it looks okay on the Index, Archive, and Home templates.
Related issue(s):
Fixes #5327.