Skip to content

Conversation

lipemat
Copy link
Contributor

@lipemat lipemat commented Oct 4, 2024

Include "shadow" in removed block support attributes within server-side-render (#65882)

Resolves issue where skipBlockSupportAttributes was not working for blocks with "shadow" support.

…ckSupportAttributes is true

Include "shadow" in removed block support attributes within server-side-render (#65882)

Resolves issue where `skipBlockSupportAttributes` was not working for blocks with "shadow" support.
Copy link

github-actions bot commented Oct 4, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: lipemat <mat-lipe@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Package] Server Side Render /packages/server-side-render labels Oct 7, 2024
@t-hamano
Copy link
Contributor

t-hamano commented Oct 7, 2024

Hi @lipemat, thanks for the PR!

Could you provide steps, code, screenshots, etc. to test this PR?

@lipemat
Copy link
Contributor Author

lipemat commented Oct 7, 2024

Attached is a quick and dirty plugin which registers a "Double Shadow" block with the required components/configuration to demonstrate the issue.

  1. Load a site like wp-now.
  2. Install the attached plugin.
  3. Edit any page, post, template, whatever.
  4. Add a "Double Shadow" block.
  5. In the block settings sidebar, add a "Shadow -> Drop Shadow".
  6. Observe the style="box-shadow: var()" is duplicated on both the wrapping <div> and internal <div>.
<div tabindex="0" class="block-editor-block-list__block wp-block is-selected wp-elements-0 wp-block-create-block-double-shadow" id="block-5789359d-0f34-43fc-bbe1-2512d73762b7" role="document" aria-label="Block: Double Shadow" data-block="5789359d-0f34-43fc-bbe1-2512d73762b7" data-type="create-block/double-shadow" data-title="Double Shadow" style="box-shadow: var(--wp--preset--shadow--crisp);"><div>
     <div style="box-shadow:var(--wp--preset--shadow--crisp);" class="wp-block-create-block-double-shadow">Hello, Double Shadow!
      </div>
</div></div>

double-shadow.zip

@lipemat lipemat closed this by deleting the head repository Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Server Side Render /packages/server-side-render [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shadow styles are not removed from ServerSideRender when skipBlockSupportAttributes is true
2 participants