Skip to content

Alpha transparent backgrounds look broken in the editor #70733

@dsas

Description

@dsas

Description

If I set a background colour with alpha transparency then the preview in the site editor looks incorrect when in design mode (with the left sidebar) - the black background bleeds through the transparency.

Once you click on the editor canvas then it appears correct again - because the background colour supplied on the html element by my browser is white.

People could be copying hex codes or using hex codes from their palette without any appreciation that they include transparency. It seems unlikely to be intentional. Perhaps we could validate or warn about the colour. Maybe though, we should just ensure there's a white background behind that preview.

Step-by-step reproduction instructions

  1. Open the site editor
  2. Open styles in the left-menu if it's not open already
  3. Click background
  4. Set a background colour that includes transparency e.g. #f5f6fe30

Note that the site preview is changed - it looks darker

Screenshots, screen recording, code snippet

Screen.Recording.2025-07-15.at.15.35.01.mov

Environment info

  • GB trunk (6c6d8b4), WP 6.8.1
  • Firefox 138

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ColorsColor management[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions