Make WordPress Core

Opened 6 months ago

Last modified 3 months ago

#58024 new defect (bug)

Twenty Twenty: button block link does not inherit custom letter spacing

Reported by: nidhidhandhukiya's profile nidhidhandhukiya Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.2
Component: Bundled Theme Keywords: has-testing-info has-screenshots has-patch needs-testing
Focuses: css Cc:

Description

Steps to reproduce the issue:-

  1. Activate Twenty Twenty theme.
  2. choose button block.
  3. Give letter spacing.

You can able to see there is no spacing between the letters.

I have attached video for better understanding.
Video URL :- https://share.cleanshot.com/B2GwwvWvlTvwZFMWD55P

Attachments (3)

58024.patch (1.9 KB) - added by nidhidhandhukiya 6 months ago.
After applying this solution the issue is resolved.
58024.1.patch (2.7 KB) - added by nidhidhandhukiya 3 months ago.
I have applied the patch, so according to this solution It will resolve the issue and also not affect the default designs.
58204.2.patch (2.4 KB) - added by sabernhardt 3 months ago.
adding override for custom letter-spacing (props harshgajipara)

Download all attachments as: .zip

Change History (10)

@nidhidhandhukiya
6 months ago

After applying this solution the issue is resolved.

#1 @sabernhardt
6 months ago

  • Focuses css added
  • Summary changed from Twenty Twenty theme button block having issue with letter spacing. to Twenty Twenty: button block link does not inherit custom letter spacing

I think this would be better to fix in the editor for any theme. If the inline style stays on the parent element, the link could inherit the letter-spacing and any other properties.

Button block links already inherit custom text-decoration from the wp-block-button element, but that is the only CSS property I found in the block library style.css.

.wp-block-button[style*="text-decoration"] .wp-block-button__link {
  text-decoration: inherit;
}

#2 @sabernhardt
6 months ago

#58023 was marked as a duplicate.

#3 in reply to: ↑ description @wesatintellitonic
6 months ago

I don't think this issue us limited to the Twenty Twenty theme — it is also happening for me when creating a blank theme with the Create Block Theme plugin.

Replying to nidhidhandhukiya:

Steps to reproduce the issue:-

  1. Activate Twenty Twenty theme.
  2. choose button block.
  3. Give letter spacing.

You can able to see there is no spacing between the letters.

I have attached video for better understanding.
Video URL :- https://share.cleanshot.com/B2GwwvWvlTvwZFMWD55P

This ticket was mentioned in Slack in #core-test by ironprogrammer. View the logs.


6 months ago

#5 @shiponkarmakar
6 months ago

  • Keywords has-testing-info has-screenshots has-patch needs-testing added

@nidhidhandhukiya
3 months ago

I have applied the patch, so according to this solution It will resolve the issue and also not affect the default designs.

#6 @pooja1210
3 months ago

Hi,

Patch report for - https://core.trac.wordpress.org/attachment/ticket/58024/58024.patch

Environment:
WordPress- v6.2.2
Theme-
Os- Mac
Browser- Chrome

Expected Result - The letter spacing should get applied to the button block ☑️

Screenshot:
Before - https://prnt.sc/aYjVOoipBzmU
After - https://prnt.sc/PLXSKQAXK4Gp

Thanks!

@sabernhardt
3 months ago

adding override for custom letter-spacing (props harshgajipara)

#7 @sabernhardt
3 months ago

I pulled 58204.2.patch from @harshgajipara's 58609.diff​ on #58609.

On that ticket, I also tried moving some CSS properties to the Buttons block instead of on the links (similar to 58024.1.patch).

Note: See TracTickets for help on using tickets.