Make WordPress Core

Opened 6 weeks ago

Closed 7 days ago

#64041 closed defect (bug) (fixed)

Twenty Twelve: support Image block rounded style

Reported by: lancewillett's profile lancewillett Owned by: joedolson's profile joedolson
Milestone: 6.9 Priority: normal
Severity: normal Version: 6.6
Component: Bundled Theme Keywords: has-patch has-screenshots commit
Focuses: css Cc:

Description

Steps to reproduce

  1. Activate Twenty Twelve version 4.6
  2. Create a new post
  3. Add an "Image" block
  4. Upload an image
  5. In block settings, select "Rounded" under "Styles"

What I expected

For the rounded styles to apply both in the editor and on the front-end of the site.

What happened instead

Editor, yes. Front-end, no. Front-end shows square (default) styles.

Attachments (6)

64041.diff (324 bytes) - added by lancewillett 6 weeks ago.
1 editor view.png (3.5 MB) - added by lancewillett 6 weeks ago.
2 before patch.png (3.8 MB) - added by lancewillett 6 weeks ago.
3 after patch.png (3.3 MB) - added by lancewillett 6 weeks ago.
64041.1.diff (518 bytes) - added by sabernhardt 6 weeks ago.
adds border-radius from WordPress 6.5 block-library styles in Twenty Twelve's blocks.css
Image block rounded style.png (2.7 MB) - added by mukesh27 5 weeks ago.
Image block rounded style

Change History (17)

@lancewillett
6 weeks ago

This ticket was mentioned in Slack in #themes by lancewillett. View the logs.


6 weeks ago

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


6 weeks ago
#2

@sabernhardt
6 weeks ago

adds border-radius from WordPress 6.5 block-library styles in Twenty Twelve's blocks.css

#3 @sabernhardt
6 weeks ago

  • Component changed from Themes to Bundled Theme
  • Focuses css added
  • Milestone changed from Awaiting Review to 6.9
  • Priority changed from low to normal
  • Severity changed from minor to normal
  • Version changed from trunk to 6.6

The Rounded style had worked with WordPress 6.5, when the block-library stylesheet included

.wp-block-image .is-style-rounded img,
.wp-block-image.is-style-rounded img {
  border-radius: 9999px;
}

6.6 reduced the specificity to

:root :where(.wp-block-image.is-style-rounded img, .wp-block-image .is-style-rounded img) {
  border-radius: 9999px;
}

which is lower than img styles in Twenty Twelve's style.css:

.entry-content img,
.widget img {
	border-radius: 3px;
}

64041.1.diff copies the pixel-value radius ruleset from the older block-library styles to the theme, and block-related styles belong in blocks.css.

#4 @mukesh27
5 weeks ago

The 64041.1.diff working fine in my testing. See attached screenshot.

@mukesh27
5 weeks ago

Image block rounded style

#5 @mukesh27
5 weeks ago

  • Keywords has-screenshots commit added

@mukesh27 commented on PR #10042:


5 weeks ago
#6

Thanks @dhruvang21.

The approach taken in https://core.trac.wordpress.org/attachment/ticket/64041/64041.1.diff is more appropriate then your so i'm going to close these PR.

#7 @rollybueno
5 weeks ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/64041/64041.1.diff

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.29
  • Server: nginx/1.29.1
  • Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
  • Browser: Chrome 140.0.0.0
  • OS: Linux
  • Theme: Twenty Twelve 4.6
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ Issue resolved with patch.

Additional Notes

  1. Switch your theme to Twenty Twelve 4.6.
  2. Create a brand-new post.
  3. Insert an Image block.
  4. Upload any image to the block.
  5. In the block settings sidebar, choose the Rounded style under Styles.

Supplemental Artifacts

Before patch:

  • Backend https://i.imgur.com/9Fi8jWb.png
  • Front-end https://i.imgur.com/CZVnmxl.png

After patch:

  • Front-end https://i.imgur.com/c4ykDX1.png

#8 @shailu25
5 weeks ago

Test Report

This Report Validates that the indicated patch address the issue.✅

Patch Tested: https://core.trac.wordpress.org/attachment/ticket/64041/64041.1.diff

Environment:

WordPress - 6.8.3
OS - Windows
Browser - Chrome
Theme: Twenty Twelve
PHP - 8.2.27
Plugin - None

Actual Results:

  • Issue Resolved with Patch ✅

Supplemental Artifacts

@dhruvang21 commented on PR #10042:


5 weeks ago
#9

@mukeshpanchal27 can you reopen this PR as i could update the code with latest patch or should create a new PR?

#10 @joedolson
8 days ago

  • Owner set to joedolson
  • Status changed from new to accepted

#11 @joedolson
7 days ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 61107:

Twenty Twelve: Restore support for Image block rounded style.

The specificity changes in core block-library styles in 6.6 caused the image block rounded style to have lower specificity than the theme stylesheet.

Add the radius ruleset from the block-library styles to Twenty Twelve to restore support.

Props lancewillett, sabernhardt, mukesh27, dhruvang21, rollybueno, shailu25, joedolson.
Fixes #64041.

Note: See TracTickets for help on using tickets.