Skip to content

Conversation

@westonruter
Copy link
Owner

I realized there was some undesirable padding in Twenty Twenty and Twenty Nineteen being applied to the .wp-block-code element. Themes made before this (e.g. Twenty Seventeen) don't have this issue because the block editor debuted with Twenty Nineteen.

Twenty Twenty

Before After
image image

Twenty Nineteen

Before After
image image

@westonruter westonruter requested a review from allejo April 26, 2020 19:50
@allejo
Copy link
Contributor

allejo commented Apr 26, 2020

Are we sure we want to remove the padding from .wp-code-block? i.e. is this the behavior you want to achieve? With the plugin disabled, here's what a code block looks like:

image

With this branch enabled, here's what the code block looks like now.

image

@westonruter
Copy link
Owner Author

Yes, as without the changes in this PR does not the second screenshot show a border outlining the with white padding inside?

@allejo
Copy link
Contributor

allejo commented Apr 26, 2020

Correct, without this PR, it looks like so.

image

I just wanted to make sure this was the intended behavior. If it is, then should we also remove any borders from .wp-code-blocks? Because otherwise, we could end up with something like this,

image

@westonruter
Copy link
Owner Author

Where is that border radius coming from?

@allejo
Copy link
Contributor

allejo commented Apr 26, 2020

The Twenty Twenty stylesheet

@westonruter
Copy link
Owner Author

Ah, yes, I see that now:

code,
kbd,
samp {
	background: rgba(0, 0, 0, 0.075);
	border-radius: 0.2rem;
}

@westonruter westonruter merged commit ea3dbf5 into master Apr 26, 2020
@westonruter westonruter deleted the remove/block-padding branch April 26, 2020 23:44
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.

3 participants