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

Fix duplicate Additional CSS classes site-logo Block & social-link Block #39777

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

shimotmk
Copy link
Contributor

@shimotmk shimotmk commented Mar 26, 2022

What?

Fix duplicate Additional CSS classes
related #39759

Why?

Duplicate class names when using custom classes
I don't think it's necessary to add a custom class in each block since it's added with get_block_wrapper_attributes.
https://developer.wordpress.org/reference/functions/get_block_wrapper_attributes/

How?

Testing Instructions

  1. Open a Post or Page.
  2. Insert a site-logo Block & social-link Block.
  3. Set Additional CSS class
  4. Look at the class name on the publish screen.

Screenshots or screencast

Before

before

After

after

@shimotmk shimotmk requested review from mkaz and ajitbohra as code owners March 26, 2022 01:47
@shimotmk shimotmk changed the title Fix duplicate Additional CSS classes post author, etc. Fix duplicate Additional CSS classes site-logo Block & social-link Block Mar 26, 2022
@Mamaduka Mamaduka self-requested a review March 26, 2022 16:01
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

It works as expected. Thank you, @shimotmk.

@Mamaduka Mamaduka merged commit abcc391 into WordPress:trunk Mar 28, 2022
@github-actions github-actions bot added this to the Gutenberg 13.0 milestone Mar 28, 2022
@DaisyOlsen DaisyOlsen added [Block] Social Affects the Social Block - used to display Social Media accounts [Block] Site Logo Affects the Site Logo Block labels Mar 30, 2022
@shimotmk shimotmk deleted the fix/attributes/custom-classnames branch August 10, 2022 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Site Logo Affects the Site Logo Block [Block] Social Affects the Social Block - used to display Social Media accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants