Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#58590 closed enhancement (fixed)

Add box shadow support to blocks in templates

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

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
10 months ago

  • Component changed from General to Editor
  • Description modified (diff)

#2 @ramonopoly
10 months ago

#58621 was marked as a duplicate.

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


10 months 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
10 months ago

  • Keywords gutenberg-merge changes-requested added
  • Milestone changed from Awaiting Review to 6.3
  • Version trunk deleted

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

@ramonopoly commented on PR #4696:


10 months ago
#5

Thank you for the review @mukeshpanchal27 ! 🙇

@madhudollu commented on PR #4696:


10 months ago
#6

Thank you for adding the tests! @ramonjd

#7 @isabel_brison
10 months ago

  • Resolution set to fixed
  • Status changed from assigned to 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:


10 months ago
#8

Committed in r56046 / e55e9c2.

Note: See TracTickets for help on using tickets.