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

Cover block gradient overlay has a black background color #38764

Closed
webmandesign opened this issue Feb 12, 2022 · 0 comments · Fixed by #38765
Closed

Cover block gradient overlay has a black background color #38764

webmandesign opened this issue Feb 12, 2022 · 0 comments · Fixed by #38765
Assignees
Labels
[Status] In Progress Tracking issues with work in progress

Comments

@webmandesign
Copy link
Contributor

Description

When a theme preset gradient is set as an overlay, the overlay background color is set to black by default Cover block styles.

This causes issues, when a gradient is set with a (semi)transparent color stop and gradient is provided as a theme preset. (An example can be seen in the intro section of the page at https://themedemos.webmandesign.eu/francesca/)

When gradient is user defined in editor, this issue does not occur as inline background: gradient(here) style is being applied, which effectively overrides Cover block default styles.

Step-by-step reproduction instructions

  1. Use a theme that contains gradient presets with transparent color stops. Or add such preset to your theme (not FSE theme) following https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#block-gradient-presets instructions.
  2. Create a page and add Cover block in its content.
  3. Set a background image for the Cover block and set an overlay to use a theme gradient with a transparent color stop.
  4. You should see black color instead of the transparent stop in the Cover block overlay both in editor and in front-end.

Screenshots, screen recording, code snippet

cover-block-transparent-color-stop-gradient-issue

Environment info

  • WordPress 5.9
  • No Gutenberg plugin

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

webmandesign added a commit to webmandesign/gutenberg that referenced this issue Feb 12, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 12, 2022
ramonjd pushed a commit that referenced this issue Feb 21, 2022
)

* Fixes #38764 by setting transparent bg color on gradient overlay

* Removing obsolete child combinator
Mamaduka pushed a commit that referenced this issue Mar 29, 2022
)

* Fixes #38764 by setting transparent bg color on gradient overlay

* Removing obsolete child combinator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant