Make WordPress Core

Opened 4 months ago

Last modified 2 days ago

#61807 new defect (bug)

Twenty Twenty-Four: Button block font weight does not reflect block setting

Reported by: viralsampat's profile viralsampat Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.4
Component: Bundled Theme Keywords: dev-feedback needs-patch has-testing-info 2nd-opinion
Focuses: css Cc:

Description

Hello Team,

I have reviewed the "Button" block and found that its typography appearance is not working while we change it either editor or front-end.

I think that it should be change based on selection.

Here, I have provided its screenshots and video for reference.

I have checked and found similar issue for theme twenty-nineteen: #61437

Thanks,

Attachments (7)

Screen Recording 2024-08-02 at 10.04.20 AM.mp4 (1.7 MB) - added by viralsampat 4 months ago.
Issue video:
twenty-four-button-block-editor.png (177.7 KB) - added by viralsampat 4 months ago.
Back-end:
twenty-four-button-block-front-end.png (85.0 KB) - added by viralsampat 4 months ago.
Front-end:
61807.patch (345 bytes) - added by viralsampat 4 months ago.
I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.
twenty-four-button-block.mp4 (1.4 MB) - added by viralsampat 4 months ago.
After resolved issue:
after-resolved-twenty-four-button-block-editor.png (159.8 KB) - added by viralsampat 4 months ago.
After resolved issue Back-end:
after-resolved-twenty-four-button-block-front-end.png (57.0 KB) - added by viralsampat 4 months ago.
After resolved issue front-end:

Change History (12)

#1 @narenin
4 months ago

  • Keywords has-testing-info added; needs-testing removed

Test Report

I have tried to replicate this and I am able to replicate the same.
Environment

WordPress: 6.7-alpha-58576-src
PHP: 8.1.23
Server: nginx/1.16.0
Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.23)
Browser: Chrome 126.0.0.0 (macOS)
Theme: Twenty Twenty-Four Version: 1.2

Expected Results

The settings applied on Button block not working.

#2 @sabernhardt
4 months ago

  • Summary changed from Twenty Twenty-four theme: The button block appearance is not working either editor or front-end. to Twenty Twenty-Four: Button block font weight does not reflect block setting
  • Version changed from 6.6.1 to 6.4

Also related: ticket:58991#comment:5, GB55681, GB60403

Twenty Twenty-Four does not enqueue a stylesheet, so I think the theme would rely on changes to block-library styles (for all themes).

@viralsampat
4 months ago

I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.

@viralsampat
4 months ago

After resolved issue:

@viralsampat
4 months ago

After resolved issue Back-end:

@viralsampat
4 months ago

After resolved issue front-end:

#3 @darshitrajyaguru97
4 months ago

Test Report

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

Environment:

OS: Windows
PHP: 8.2.12
WordPress: 6.6.1
Browser: Chrome
Theme: Twenty Twenty Four
Plugins: None activated

Actual Results:

Before patch:
Backend: https://prnt.sc/Ku-r0aTn-Mqs
Frontend: https://prnt.sc/1IuR46ZHDlqJ

After patch:
Backend: https://prnt.sc/2B17dnfY4ulW
Frontend: https://prnt.sc/pOWGyMwDHvCj

✅ Patch working well as desired solution

#4 @poena
2 days ago

  • Keywords commit added

Ideally this should be fixed in the referenced Gutenberg issues, but since the change in 61807.patch is so small and fixes the issue, I think we can add this.

#5 @poena
2 days ago

  • Keywords 2nd-opinion added; commit removed

Looking closer, the variations inside the styles folder also adds font appearances to the button. These styles are not the same as the defaults, so inherit can not be used.

Let me try to explain it better:
In theme.json, inherit would work because the default styling of the block would be unchanged.
In the style variations, inherit would not work because the style of the block would be changed. The variations would loose a part of their design, and this should be avoided.

Because of this, I don't think this can be solved in the theme.

Note: See TracTickets for help on using tickets.