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

Try: Padding fix. #185

Merged
merged 1 commit into from
Apr 12, 2021
Merged

Try: Padding fix. #185

merged 1 commit into from
Apr 12, 2021

Conversation

jasmussen
Copy link
Member

#177 retired the front only stylesheet.

It also changed .wp-block-jetpack-layout-grid to .wp-block-jetpack-layout-grid-editor, in the editor only. Which appears to have caused some issues with custom column paddings, and grid end gutters as well.

This PR does fix that:

patch

However I'm not sure this is the way we should fix it. In part also because I'm not entirely sure why it fixes it. A better fix might be to not rename that class in the first place.

@jasmussen jasmussen requested a review from johngodley April 12, 2021 11:46
@jasmussen jasmussen self-assigned this Apr 12, 2021
@jasmussen jasmussen force-pushed the try/padding-fix-1-6 branch from a05db3e to e5e8e16 Compare April 12, 2021 11:48
@johngodley
Copy link
Member

This fixes the end gutters when I try in 2021. I wasn't able to see a problem with the gutter size setting, but maybe it's theme specific.

A better fix might be to not rename that class in the first place.

The problem we have is that the editor DOM and front-end DOM are different, and so different styles are needed to apply the grid. However, because we use the same class names then the front-end grid is partially affecting the editor grid in unpredictable ways.

The simplest solution seemed to be found in renaming the editor class so it's not affected by the front end.

I agree that it's not ideal. I would hope that a lot of the need for this will disappear with #105, but that's a much bigger job that requires more work. I was hoping the Global Grid would appear in the meantime and negate the need for it!

I'll look this into the wp.com diff and try it out on a few more themes, but otherwise it's looking good.

@johngodley
Copy link
Member

Confirmed that this also fixes the individual column padding, which I missed. Let's merge and take this over to wp.com

@johngodley johngodley merged commit ed7087b into master Apr 12, 2021
@johngodley johngodley deleted the try/padding-fix-1-6 branch April 12, 2021 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants