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: Using 'transparent' as color value produces unexpected preview background #42230

Closed
danielbachhuber opened this issue Jul 7, 2022 · 0 comments · Fixed by #42232
Assignees

Comments

@danielbachhuber
Copy link
Member

danielbachhuber commented Jul 7, 2022

Description

When I pass 'transparent' as a potential color to ColorPalette, it unexpectedly shows a white background:

image

I would expect the background to be representative of the color, similar to other colors:

image

Related #42170

Step-by-step reproduction instructions

<PanelColorSettings
	title={ __( 'Color Settings' ) }
	colorSettings={ [
		{
			label: __( 'Background Color' ),
			colors: [
				{
					name: __( 'Dark Gray' ),
					slug: 'dark-gray',
					color: '#111',
				}
				{
					name: __( 'Transparent' ),
					slug: 'transparent',
					color: 'transparent',
				}
			],
		},
	] }
/>

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

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