Make WordPress Core

Opened 2 years ago

Closed 2 months ago

Last modified 11 days ago

#56443 closed defect (bug) (fixed)

Twenty Nineteen: button block font size issue.

Reported by: nidhidhandhukiya's profile nidhidhandhukiya Owned by: karmatosed's profile karmatosed
Milestone: 6.6 Priority: normal
Severity: normal Version: 6.0.1
Component: Bundled Theme Keywords: has-patch needs-testing commit
Focuses: css Cc:

Description

Steps to reproduce:-

  1. Activate Twenty Nineteen Theme.
  2. Choose button block.
  3. Change the font size of the button.
  4. Check at the Front side.

You can see the font is a little lesser than our given font size.
The font size is exactly the same on our editor side but the front side font is lesser than the given font-size value.
I have attached video for better understanding.
Video URL:- https://share.cleanshot.com/gr6tIUCZSXR6Xj54uqLn

Attachments (6)

56443.patch (1.8 KB) - added by nidhidhandhukiya 2 years ago.
Button blocks.txt (4.3 KB) - added by sabernhardt 3 months ago.
the Button blocks I used for testing
2019-Button-blocks-before.png (44.5 KB) - added by sabernhardt 3 months ago.
Button blocks before patch, on the front end
2019-Button-blocks-with-PR6511.png (45.9 KB) - added by sabernhardt 3 months ago.
Button blocks with PR 6511, on the front end
56443-before-patch.png (94.2 KB) - added by shailu25 2 months ago.
Before Patch - Frontend
56443-after-patch.png (98.8 KB) - added by shailu25 2 months ago.
After Patch - Frontend

Download all attachments as: .zip

Change History (19)

#1 @SergeyBiryukov
15 months ago

  • Summary changed from Twenty Nineteen Theme button block font size issue. to Twenty Nineteen: button block font size issue.

#2 @karmatosed
4 months ago

  • Keywords has-patch added

#3 @karmatosed
4 months ago

  • Keywords needs-testing added

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


3 months ago
#4

Resets the relative measurement on .wp-block-button__link when either its Buttons or Button block has a custom size. Without this change, the value is 88.9% of the selected size.

Trac 56443

#5 @sabernhardt
3 months ago

The first patch would increase the default size to 22px.

PR 6511 only changes the value when the Button or Buttons block has a custom size.

@sabernhardt
3 months ago

the Button blocks I used for testing

@sabernhardt
3 months ago

Button blocks before patch, on the front end

@sabernhardt
3 months ago

Button blocks with PR 6511, on the front end

#6 @sabernhardt
3 months ago

  • Milestone changed from Awaiting Review to 6.6

#7 @manojmaharrshi
2 months ago

Hi,
Test Report
Patch tested - https://core.trac.wordpress.org/attachment/ticket/56443/56443.patch
Environment:
WordPress: 6.5.3
PHP: 8.1.23
Browser: Chrome 125
OS: Windows 11
Theme: Twenty Nineteen
Expected Result: The font size for the button should be changed as per settings and should look fine on the frontend and backend and this is working as expected.
Screenshots:
Before:
Front end: https://prnt.sc/z-7rJ5l9xH4m
Back end: https://prnt.sc/Pt2KZTM_wd5_
After:
Front end: https://prnt.sc/2ymWenmwUddf
Back end: https://prnt.sc/IjLHzXDmWSbA
Thanks

Last edited 2 months ago by manojmaharrshi (previous) (diff)

#8 @darshitrajyaguru97
2 months ago

Test Report

Patch tested: https://core.trac.wordpress.org/attachment/ticket/56443/56443.patch


Environment:


OS: Windows 10
PHP: 8.1.23
WordPress: 6.5
Browser: Chrome
Theme: Twenty Nineteen
Plugins: None

Actual Results:


Before patch:
Backend: https://prnt.sc/O3cWcFlftmrx
Frontend: https://prnt.sc/mGX9JeWjnwx6

After patch:
Backend: https://prnt.sc/zC7RXdPpGGbT
Frontend: https://prnt.sc/Jvzj4Ls3iFGY


✅ Patch working well as desired solution

#9 @sabernhardt
2 months ago

56443.patch would increase the default font size for Button block links.

Please test PR 6511 (6511.diff) to verify that

  1. the default font size is still 0.88889em (19.55556 pixels) and
  2. custom and preset font sizes, whether set on the Buttons or Button block, will match what was chosen.

#10 @shailu25
2 months ago

Test Report

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/6511

Environment:

WordPress - 6.5.3
OS - Windows
Browser - Firefox
Theme: Twenty Nineteen
PHP - 8.1.23

Actual Results:

  • Issue Resolved With Patch.✅
  • Selected Font size (in Backend) is showing on front-end Side in button or button block & if no font size is selected then its showing default font size.(0.88889em)✅

@shailu25
2 months ago

Before Patch - Frontend

@shailu25
2 months ago

After Patch - Frontend

#11 @karmatosed
2 months ago

  • Keywords commit added

I am going to assign to myself to progress to commit as we now have testing, thank you everyone.

#12 @karmatosed
2 months ago

  • Owner set to karmatosed
  • Resolution set to fixed
  • Status changed from new to closed

In 58199:

Twenty Nineteen: Resolves button block font issues.

The font on buttons was displaying less than the font size when applied through the editor. This resets the relative measurement on wp-block-buttonlink when either its Buttons or Button block has a custom size.

Props nidhidhandhukiya, sabernhardt, SergeyBiryukov, manojmaharrshi, darshitrajyaguru97, shailu25.
Fixes #56443.

@sabernhardt commented on PR #6511:


11 days ago
#13

Committed in r58199

Note: See TracTickets for help on using tickets.