Make WordPress Core

Opened 15 months ago

Last modified 10 months ago

#56109 new defect (bug)

Twenty Twenty-One: Button font size issue when we change the alignment

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

Description

Activate Twenty Twenty one 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/RM7ldWCN165aUBR4vzxm

Attachments (4)

#56109.patch (633 bytes) - added by kajalgohel 15 months ago.
patch added
56109.1.patch (601 bytes) - added by multidots1896 15 months ago.
added patch
56109.2.patch (668 bytes) - added by devtanbir 15 months ago.
56109.3.2.patch (601 bytes) - added by nidhidhandhukiya 15 months ago.

Download all attachments as: .zip

Change History (10)

@kajalgohel
15 months ago

patch added

#1 @kajalgohel
15 months ago

  • Keywords has-patch added; needs-patch removed

#2 @nidhidhandhukiya
15 months ago

  • Version set to 6.0

@multidots1896
15 months ago

added patch

#3 @SergeyBiryukov
15 months ago

  • Summary changed from Twenty Twenty one theme button font size issue when we change the alignement. to Twenty Twenty-One: Button font size issue when we change the alignment

@devtanbir
15 months ago

#4 @poena
15 months ago

Hi!

Targeting the class .has-custom-font-size on the button like in patch 56109.1 will work better than removing the CSS property in patch 56109.2.

  • This is because removing the CSS property will break existing sites that uses it.
  • Is there a way we can make the selector less specific than in patch 56109.1?
  • The theme uses sass and the CSS files are generated with the build tools and commands listed in the package.json file. This means that the changes need to be made to the .scss files, or the changes will be overwritten.

The correct scss file to update for the button block's editor view is
twentytwentyone/assets/sass/05-blocks/button/_editor.scss

#5 @nidhidhandhukiya
15 months ago

Hello @poena,
As per your suggestion i have applied patch with the given path.
Once we apply this solution we need to run the command.
By opening terminal at this path.
core/trunk/wp-content/themes/twentytwentyone

npm run build:style-editor

Then our css build and automatically add to the style-editor.css

#6 @poena
10 months ago

  • Keywords needs-refresh added

Hi
I apologize for taking so long to get back to this ticket.
In patch 56109.3.2, the wrong file is updated. The change was made to the separator block, not the button.

Note: See TracTickets for help on using tickets.