Make WordPress Core

Opened 9 months ago

Closed 9 months ago

Last modified 8 months ago

#60132 closed enhancement (fixed)

Add background-repeat CSS property to safe_style_css filter

Reported by: andrewserong's profile andrewserong Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.5 Priority: normal
Severity: normal Version: 6.5
Component: Editor Keywords: gutenberg-merge has-patch has-unit-tests add-to-field-guide
Focuses: Cc:

Description

To support extending both the style engine and background image block supports to include a toggle for background-repeat, let's add the background-repeat property to the safe_style_css filter, to ensure the CSS property can be output.

The proposed new control to allow toggling background repeat has landed in the Gutenberg plugin as of https://github.com/WordPress/gutenberg/pull/57005. Note that other PHP parts of that PR will be backported separately, to keep things contained.

Change History (5)

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


9 months ago
#1

  • Keywords has-patch has-unit-tests added

This PR adds the background-repeat property to safe_style_css to support the missing background repeat property.

This is a prerequisite for adding in a background-repeat toggle to the background image support feature, which has landed in Gutenberg in: https://github.com/WordPress/gutenberg/pull/57005

Note: that PR includes other PHP changes that will be backported separately, so that this PR can just focus on the proposed change to kses.php and its tests.

To test, ensure the tests pass, or if you're using the Docker environment for wordpress-develop, run the following locally: npm run test:php /var/www/tests/phpunit/tests/kses.php

Trac ticket: https://core.trac.wordpress.org/ticket/60132

@andrewserong commented on PR #5814:


9 months ago
#2

Thanks for giving this a quick look! I forgot to add the ticket number to the test that uses this data provider. Added in https://github.com/WordPress/wordpress-develop/pull/5814/commits/5fc84d2f977ce0bd3016660ceab2d03f664203d6

#3 @SergeyBiryukov
9 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 57228:

KSES: Add background-repeat to the list of safe CSS properties.

Follow-up to [45242], [46235].

Props andrewserong, ramonopoly, mukesh27.
Fixes #60132.

@SergeyBiryukov commented on PR #5814:


9 months ago
#4

Thanks for the PR! Merged in r57228.

#5 @stevenlinx
8 months ago

  • Keywords add-to-field-guide added
Note: See TracTickets for help on using tickets.