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

Twenty Twenty-One blocks: Migrate styles for Media & text #112

Open
carolinan opened this issue Dec 7, 2020 · 3 comments
Open

Twenty Twenty-One blocks: Migrate styles for Media & text #112

carolinan opened this issue Dec 7, 2020 · 3 comments

Comments

@carolinan
Copy link
Collaborator

carolinan commented Dec 7, 2020

From: #82

For this block, the block style with the border is already migrated.

Twenty Twenty-One also has additional inner padding compared to the style in the editor.

The original editor style only has horizontal padding:
https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/media-text/style.scss#L50

.wp-block-media-text .wp-block-media-text__content {
	direction: ltr;
	/*!rtl:begin:ignore*/
	grid-column: 2;
	grid-row: 1;
	/*!rtl:end:ignore*/
	padding: 0 8% 0 8%;
	word-break: break-word;
}

This means that with the option to adjust the position of the text, the text content may touch the upper and lower edges of the block.

This should be adjusted in Gutenberg. But should we add the experimental spacing / padding settings to the text part of the block only, or adjust the vertical padding in the block CSS?

We should also research if the 8% value is consistent with the spacing for other blocks or if it needs to be updated.

@kjellr
Copy link
Collaborator

kjellr commented Dec 7, 2020

We should also research if the 8% value is consistent with the spacing for other blocks or if it needs to be updated.

I've always found that to be a weird number. 😄 It looks ok, but I agree it would be good to choose something more standard. From what I can tell, I'm not sure there was a solid reason behind using 8% instead of a different value.

@scruffian
Copy link
Collaborator

I think we should add the experimental spacing / padding option to the block, and then set the values in the theme.json. We won't be able to use 8% though, as the control only works with pixel values.

@scruffian
Copy link
Collaborator

I think we should add the experimental spacing / padding option to the block, and then set the values in the theme.json. We won't be able to use 8% though, as the control only works with pixel values.

I added the option to have other values here, so we can have percentages now.

@scruffian scruffian self-assigned this Jan 5, 2021
@scruffian scruffian removed their assignment Jan 5, 2021
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

No branches or pull requests

3 participants