Make WordPress Core

Opened 4 years ago

Closed 3 weeks ago

Last modified 3 weeks ago

#58099 closed defect (bug) (worksforme)

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

Reported by: nidhidhandhukiya Owned by:
Priority: normal Milestone:
Component: Bundled Theme Version: 5.7
Severity: normal Keywords:
Cc: Focuses: css

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 (9)

#1 @nidhidhandhukiya
4 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
4 years ago

  • Focuses css added
  • Keywords needs-patch added
  • Milestone Awaiting Review → Future Release
  • Summary Twenty nineteen button having issue in editor side when width is used. → 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
4 years ago

  • Version 6.2 → 5.7

The button width settings have been available since 5.7.

#4 @sabernhardt
3 years ago

#60885 was marked as a duplicate.

#5 @rishabhwp
17 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 17 months ago by rishabhwp (previous) (diff)

#6 @karmatosed
3 weeks ago

  • Keywords needs-testing added; needs-patch removed

Thank you for the testing on this. It would be great though to get a second test as this still seems valid in core. If it reproduces, then ew can turn @sabernhardt’s selector proposal into a patch, if not we can close as worksforme.

#7 @r1k0
3 weeks ago

  • Keywords needs-testing removed

Reproduction Report

Environment

  • WordPress: 7.1.3
  • Subdirectory: No
  • PHP: 8.3.36
  • Server: PHP.wasm
  • Database: WP_MySQL_On_SQLite (Server: 8.0.38-mysql-on-sqlite-3.1.0 / Client: 3.51.0)
  • Browser: Chrome 155.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Nineteen 3.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.3.1

Steps taken

  1. Follow the steps by the reporter.
  2. ❌ Bug is not occurring

Actual behavior

  • The button width is adjusted accordingly when the width setting slider is moved.

Expected behavior

  • The button width is adjusted accordingly when the width setting slider is moved.

Additional Notes

  • I was able to reproduce it using WP 5.7 and Twenty Nineteen 2.5, but it seems to have been fixed.
  • Updating keyword by removing needs-testing as the bug is no longer present.

Screenshots/Screencast with results

  • 25%

https://i.ibb.co/6RdcQnnn/button-twentyfive-pc.png

  • 50%

https://i.ibb.co/v67pD54n/button-fifty-pc.png

  • 75%

https://i.ibb.co/hJXRv3RQ/button-seventyfive-pc.png

  • 100%

https://i.ibb.co/XfSnNTHx/button-onehundred-pc.png

Last edited 3 weeks ago by r1k0 (previous) (diff)

#8 @sabernhardt
3 weeks ago

  • Milestone Future Release
  • Resolution → fixed
  • Status new → closed

I tested with 7.2-beta1-64675 and did not reproduce the problem either. If someone still experiences the issue, please reopen the ticket.

#9 @sabernhardt
3 weeks ago

  • Resolution fixed → worksforme
Note: See TracTickets for help on using tickets.