Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Update the button styles in Pitch style variation #216

Closed
madhusudhand opened this issue Sep 28, 2022 · 6 comments · Fixed by #237
Closed

Update the button styles in Pitch style variation #216

madhusudhand opened this issue Sep 28, 2022 · 6 comments · Fixed by #237
Milestone

Comments

@madhusudhand
Copy link
Collaborator

Fill and outline buttons are having different sizes in Pitch style variation.

image

Expectation:

Outline button size (padding) should match with fill button.

@madhusudhand madhusudhand added the Good First Issue Good for newcomers label Sep 28, 2022
@mikachan mikachan added this to the Beta 3 milestone Sep 28, 2022
@mikachan mikachan added [Type] Gutenberg and removed Good First Issue Good for newcomers labels Sep 30, 2022
@mikachan
Copy link
Member

I believe this is because we can't yet style the outline button via theme.json.

I think the only way to make these consistent would be to remove the custom padding from styles.elements.button.spacing.padding.

@richtabor @beafialho what do you think we should do here?

@beafialho
Copy link
Collaborator

I believe this is because we can't yet style the outline button via theme.json.

What's keeping us from doing that?

@mikachan
Copy link
Member

This variation is adding additional padding to buttons:

"padding": {
	"top": "min(1.25rem, 3vw)",
	"right": "min(2.25rem, 5vw)",
	"bottom": "min(1.25rem, 3vw)",
	"left": "min(2.25rem, 5vw)"
}

I think this works really well overall, however it isn't applied to the outline style of buttons, so it causes the issue in @madhusudhand's screenshot. I don't think we're setting button padding anywhere else, so I think that's why it's the first time we've seen this.

@mikachan
Copy link
Member

... I completely misread your question, sorry 🙈

What's keeping us from doing that?

We can't yet style the outline buttons using theme.json. There's an open issue here: WordPress/gutenberg#42794, however, I'm not sure how likely it is that Gutenberg is going to support this any time soon.

@beafialho
Copy link
Collaborator

Thank you @mikachan! We could add that issue to #30, but if it doesn't happen soon, my suggestion is to align the padding of the filled button with the outlined button. However, I'd like to hear @richtabor 's thoughts.

@madhusudhand
Copy link
Collaborator Author

@beafialho @mikachan Found a work around to fix the issue, created #237

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

Successfully merging a pull request may close this issue.

3 participants