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

Blockbase: ponyfill p margins rules create unexpected behavior #4851

Closed
RavanH opened this issue Oct 15, 2021 · 4 comments · Fixed by #4908
Closed

Blockbase: ponyfill p margins rules create unexpected behavior #4851

RavanH opened this issue Oct 15, 2021 · 4 comments · Fixed by #4908

Comments

@RavanH
Copy link
Contributor

RavanH commented Oct 15, 2021

The following rule in ponyfill.css which creates unexpected top margins for paragraphs:

p.wp-block.wp-block-paragraph, *[class^="wp-container"] > * + p, p {
    margin-top: 1em;
    margin-bottom: 1em;
}

Steps to replicate

Create a new post with Title and three paragraphs. Then place one of the paragraphs inside a group block and move it to different positions in respect to the other two paragraphs.

Result

When the group block is in position two or three, the margins are different from when in first position or when no group block is used:

top-margin-ponyfill

Expected

Margins to be constant, as happens when the above ponyfill style rule is disabled:

top-margin-default

@scruffian
Copy link
Member

We removed this code so I think we can close this. Thanks for reporting.

@RavanH
Copy link
Contributor Author

RavanH commented Oct 15, 2021

Ah ok... I had not verified the latest dev version. Great :)

@RavanH
Copy link
Contributor Author

RavanH commented Oct 15, 2021

Ah no, hang on...

The rule

p.wp-block.wp-block-paragraph,
*[class^="wp-container"] > * + p,
p {
	margin-top: 1em;
	margin-bottom: 1em;
}

is still there in trunk. This one is responsible for the effect in the first example...

I've updated the original report (title and content) to reflect the remaining issue.

@RavanH RavanH changed the title Blockbase: ponyfill :first-child an p margins create unexpected behavior Blockbase: ponyfill p margins rules create unexpected behavior Oct 15, 2021
@scruffian scruffian reopened this Oct 15, 2021
@pbking
Copy link
Contributor

pbking commented Oct 18, 2021

Related to comments on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants