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

ColorPalette: Fix transparent checkered background pattern #45295

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

brookewp
Copy link
Contributor

What?

Update the ColorPalette component's transparent checkered background pattern, so it doesn't become slightly cut off on the right side as outlined in this issue: #42687

Why?

For a more visually appealing look.

One thing to note is in Storybook, the background is 248px wide when set to the WP Sidebar max-width. In the editor, it's 228px wide, so the look is slightly different the checkered pattern is still cut off but in a less awkward way.

If we don't want anything cut off, we could change the pattern to 19px and set the height from 64px to 57px. For one example, so visually, it doesn't change too much.

How?

By changing the background size and positioning to 24px instead of 25px, as suggested by @mirka in the issue mentioned above (#42687).

Testing Instructions

  1. Add a block that has color options (i.e. button block, paragraph block) to the editor in a page or post
  2. Click on 'Background', 'Text', 'Link', or whichever color options are available in the block sidebar
  3. See the transparent background with the checkered pattern that isn't as cut off on the right side as the 'before' screenshot below

Screenshots or screencast

Before:
Screen Shot 2022-10-25 at 6 12 47 PM

After:
Screen Shot 2022-10-25 at 6 36 19 PM

@brookewp brookewp requested a review from ajitbohra as a code owner October 26, 2022 01:49
@mirka mirka requested review from mirka, chad1008 and ciampo October 26, 2022 14:32
@mirka mirka added the [Package] Components /packages/components label Oct 26, 2022
Copy link
Contributor

@chad1008 chad1008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀 🚢

Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better if we add a CHANGELOG entry for this fix?

@brookewp brookewp force-pushed the fix/color-palette-pattern branch from 3f36c40 to d3e3637 Compare October 26, 2022 16:46
@brookewp brookewp requested review from ciampo and removed request for mirka and ajitbohra October 26, 2022 16:46
@mirka mirka merged commit 6c9c919 into WordPress:trunk Oct 26, 2022
@github-actions github-actions bot added this to the Gutenberg 14.5 milestone Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants