Make WordPress Core

Opened 3 years ago

Last modified 7 months ago

#58099 new defect (bug)

Twenty Nineteen: Button block does not respect custom width in the editor

Reported by: nidhidhandhukiya's profile nidhidhandhukiya Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.7
Component: Bundled Theme Keywords: needs-patch
Focuses: css Cc:

Description

Steps to reproduce the issue :-

  1. Activate Twenty Nineteen theme.
  2. Choose button block.
  3. Apply width from 25, 50 or 75.

You can able to see a different changes user side but editor side it remains same.

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

Change History (5)

#1 @nidhidhandhukiya
3 years ago

The reason behind this issue is the css below.

.editor-styles-wrapper .wp-block .wp-block {
    width: initial;
}

If we remove this the issue is resolved.
(Note:- I don't know for which actual problem solution this css is written so if we remove this it will affect other block)

#2 @sabernhardt
3 years ago

  • Focuses css added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from Twenty nineteen button having issue in editor side when width is used. to Twenty Nineteen: Button block does not respect custom width in the editor

The width was added mainly for blocks inside Column blocks (and/or Group blocks, etc.) in PR 454 and PR 526. Then [47587] changed the value from 100% to initial.

The SCSS file probably could use .wp-block:where(:not(.has-custom-width)), which would compile to .editor-styles-wrapper .wp-block .wp-block:where(:not(.has-custom-width)).

#3 @sabernhardt
3 years ago

  • Version changed from 6.2 to 5.7

The button width settings have been available since 5.7.

#4 @sabernhardt
20 months ago

#60885 was marked as a duplicate.

#5 @rishabhwp
7 months ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.28
  • Server: nginx/1.27.5
  • Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 138.0.0.0
  • OS: macOS
  • Theme: Twenty Nineteen 3.1
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ❌ Error condition didn't occur.

Supplemental Artifacts

https://i.ibb.co/27Zp6wJJ/Screenshot-2025-06-27-at-4-52-01-PM.png

Last edited 7 months ago by rishabhwp (previous) (diff)
Note: See TracTickets for help on using tickets.