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

[FEAT] Cover block linear-gradient #1949

Merged
merged 1 commit into from
Feb 26, 2020
Merged

Conversation

dratwas
Copy link
Contributor

@dratwas dratwas commented Feb 24, 2020

This is a part of #1737

In this PR i added support for the linear gradient that is set on the web in the cover block.

Gutenberg PR - WordPress/gutenberg#20411

To test:
Add below code to initial-html:

<!-- wp:cover {"minHeight":430,"gradient":"luminous-dusk"} -->
<div class="wp-block-cover has-background-dim has-luminous-dusk-gradient-background" style="min-height:430px"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} -->
<p class="has-text-align-center has-large-font-size"></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover -->

<!-- wp:cover {"customGradient":"linear-gradient(135deg,rgb(254,205,165) 24%,rgb(254,45,45) 50%,rgb(107,0,62) 77%)"} -->
<div class="wp-block-cover has-background-dim has-background-gradient" style="background:linear-gradient(135deg,rgb(254,205,165) 24%,rgb(254,45,45) 50%,rgb(107,0,62) 77%)"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…"} -->
<p class="has-text-align-center">Hello moto</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover -->

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Copy link
Member

@geriux geriux left a comment

Choose a reason for hiding this comment

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

@dratwas dratwas force-pushed the feat/cover-block-gradient branch 3 times, most recently from eab7783 to 29ccc76 Compare February 26, 2020 14:40
@dratwas dratwas merged commit 3ae9087 into develop Feb 26, 2020
@dratwas dratwas deleted the feat/cover-block-gradient branch February 26, 2020 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants