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

Style issue of columns #13035

Closed
incNick opened this issue Dec 20, 2018 · 3 comments
Closed

Style issue of columns #13035

incNick opened this issue Dec 20, 2018 · 3 comments
Labels
[Block] Columns Affects the Columns Block [Type] Bug An existing feature does not function as intended

Comments

@incNick
Copy link

incNick commented Dec 20, 2018

Describe the bug
Columns style issue

To Reproduce
Steps to reproduce the behavior:

  1. create 3 columns and fill image
  2. create 4 columns and fill image
  3. for 3 columns, the lasd child still has style margin-right: 32px;

Expected behavior
Should be same as 4 columns

Screenshots
20181220190723

Desktop (please complete the following information):

  • all

Smartphone (please complete the following information):

  • unknow

Additional context
@media (min-width: 600px) {
.wp-block-column:nth-child(odd) {margin-right: 32px}
/should be/
.wp-block-column:nth-child(odd):not(:last_child) {margin-right: 32px}
}
20181220191006

@swissspidy swissspidy added Needs Testing Needs further testing to be confirmed. [Block] Columns Affects the Columns Block labels Dec 20, 2018
@drdogbot7
Copy link

#12816 attempts to fix this bug, as well as another one between 600px and 782px. Hopefully this will be part of 5.1. Feel free to test it or add your thoughts.

In the meantime, adding this css should fix it.

.wp-block-column {
	@media ( min-width: 600px ) {
		flex-basis: calc(50% - 16px);
		flex-grow: 0;
		&:not(:first-child) {
			margin-left: 0;
		}
		&:not(:last-child) {
			margin-right: 0;
		}
		&:nth-child(even) {
			margin-left: 16px;
		}
		&:nth-child(odd) {
			margin-right: 16px;
		}
	}
	@media ( min-width: 782px ) {
		&:nth-child(even) {
			margin-left: 0;
		}
		&:nth-child(odd) {
			margin-right: 0;
		}
		&:not(:first-child) {
			margin-left: 16px;
		}
		&:not(:last-child) {
			margin-right: 16px;
		}
	}
}

@designsimply designsimply added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Dec 20, 2018
@designsimply
Copy link
Member

Thanks for raising this issue! There has been some work to address this problem happening in #12199.

@skorasaurus
Copy link
Member

Thanks for reporting; I'm unable to reproduce this and it was fixed in #12199 ; this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants