Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#58590 closed enhancement (fixed)

Add box shadow support to blocks in templates

Reported by: madhudollu Owned by: madhudollu
Priority: normal Milestone: 6.3
Component: Editor Version:
Severity: normal Keywords: has-patch has-unit-tests gutenberg-merge changes-requested
Cc: Focuses:

Description (last modified by sabernhardt)

Bring the support for shadow with in templates.
Following are the proposed supports.

<!-- wp:post-title {"shadow":"natural"} /-->
<!-- wp:post-title {"style":{"shadow": "10px 10px 10px 10px #000"}} /-->

Note: The block must have the supports for "shadow" enabled for this to apply in the UI.

The solution has already been merged to Gutenberg here: ​https://github.com/WordPress/gutenberg/pull/46896

This ticket is to back-port these changes to the core.

Change History (8)

#1 @sabernhardt
3 years ago

  • Component General → Editor
  • Description modified (diff)

#2 @ramonopoly
3 years ago

#58621 was marked as a duplicate.

This ticket was mentioned in ​PR #4696 on ​WordPress/wordpress-develop by ​@ramonopoly.


3 years ago
#3

  • Keywords has-patch has-unit-tests added

This PR is a continuation of ​https://github.com/WordPress/wordpress-develop/pull/4664 but adds tests

props to @madhusudhand

It adds the PHP changes for the following Gutenberg PRs:

​https://github.com/WordPress/gutenberg/pull/46896

There are no front-end changes in this PR.

Testing instructions:

Enable supports for blocks such as post-title

src/wp-includes/blocks/post-title/block.json

{
...
"supports": {
  "shadow": true,
  ...
}

In the theme template add shadow attribute as follows.

Verify the post title UI to have the applied shadow.

https://i0.wp.com/user-images.githubusercontent.com/1935113/247542775-12172326-42ef-446c-9dfd-28c54267176a.png

Trac ticket: https://core.trac.wordpress.org/ticket/58590

#4 @mukesh27
3 years ago

  • Keywords gutenberg-merge changes-requested added
  • Milestone Awaiting Review → 6.3
  • Version trunk

@ramonopoly Left some feedback on PR. Set the milestone 6.3

​@ramonopoly commented on ​PR #4696:


3 years ago
#5

Thank you for the review @mukeshpanchal27 ! 🙇

​@madhudollu commented on ​PR #4696:


3 years ago
#6

Thank you for adding the tests! @ramonjd

#7 @isabel_brison
3 years ago

  • Resolution → fixed
  • Status assigned → closed

In 56046:

Editor: add box shadow support to blocks.

Adds the ability for blocks to declare support for CSS box-shadow and processing of necessary styles.

Props madhudollu, sabernhardt, ramonopoly, spacedmonkey, mukesh27.
Fixes #58590.

​@isabel_brison commented on ​PR #4696:


3 years ago
#8

Committed in r56046 / ​e55e9c2.

Note: See TracTickets for help on using tickets.