Make WordPress Core

Opened 20 months ago

Closed 8 months ago

#56107 closed defect (bug) (worksforme)

Twenty Seventeen: Button font size issue

Reported by: nidhidhandhukiya's profile nidhidhandhukiya Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.0
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Steps to reproduce :-
Activate Twenty seventeen theme.
Take a button block.
Align button to any left, center or right.
Then add font size it should not reflect on button on the editor side it should work properly on the user side.
If you make button alignment to none then this issue will not happen.

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

Attachments (3)

56107.patch (466 bytes) - added by nidhidhandhukiya 20 months ago.
after applying this solution the issue is resolved.
2017-large-button-center-6.0.png (118.1 KB) - added by sabernhardt 8 months ago.
extra div in editor in WordPress 6.0
2017-large-button-center-6.2.png (111.1 KB) - added by sabernhardt 8 months ago.
font-size is inherited in WordPress 6.2

Download all attachments as: .zip

Change History (6)

@nidhidhandhukiya
20 months ago

after applying this solution the issue is resolved.

#1 @nidhidhandhukiya
20 months ago

  • Keywords has-patch needs-testing added

#2 @SergeyBiryukov
20 months ago

  • Summary changed from Twenty Seventeen theme button font size issue. to Twenty Seventeen: Button font size issue

@sabernhardt
8 months ago

extra div in editor in WordPress 6.0

@sabernhardt
8 months ago

font-size is inherited in WordPress 6.2

#3 @sabernhardt
8 months ago

  • Keywords needs-testing removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Thanks for the report!

In WordPress 6.0, the editor had inserted an extra .wp-block div in between .wp-block-buttons and .wp-block-button, so the inheriting did not work with alignment options.

.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{
  font-size:inherit;
}

With WordPress 6.2, the alignment options are not the same, but I was not able to get the extra div with any alignment option.

This works for me without editing the theme.

Note: See TracTickets for help on using tickets.