Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 9 months ago

#58551 closed enhancement (fixed)

Add kses support for complex CSS grid values including `repeat`, `auto-fill` and `auto-fit`

Reported by: isabel_brison's profile isabel_brison Owned by: peterwilsoncc's profile peterwilsoncc
Milestone: 6.3 Priority: normal
Severity: normal Version: 6.3
Component: Formatting Keywords: has-patch has-unit-tests add-to-field-guide
Focuses: Cc:

Description

In order for the new grid layout type from Gutenberg https://github.com/WordPress/gutenberg/pull/49018 to work, kses needs to support a variety of grid values.

For the current implementation only repeat and auto-fill are strictly necessary, but this may change in the future so it might be worth considering support for auto-fit, max-, min- and fit-content. The grid spec is getting built out fast, and soon there will also be good browser support for subgrid, with masonry following behind. See https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns for a list of possible values.

Change History (7)

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


10 months ago
#1

  • Keywords has-patch has-unit-tests added

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

Adds support for the CSS repeat function.

The Trac ticket mentions support for auto-fit and -fill, but in testing I realised those are already implicitly supported so no changes needed there.

To test this change in the front end, apply the patch on top of #4625 and follow testing steps from that PR.

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


10 months ago
#2

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

Adds support for the CSS repeat function.

The Trac ticket mentions support for auto-fit and -fill, but in testing I realised those are already implicitly supported so no changes needed there.

To test this change in the front end, apply the patch on top of #4625 and follow testing steps from that PR.

@azaozz commented on PR #4637:


10 months ago
#3

LGTM

@isabel_brison commented on PR #4637:


10 months ago
#4

Not sure about the removal of the aria-* attributes (seems like a typo/accidental)?

Definitely accidental! I wonder how it happened, I didn't edit those lines manually 🤔

#5 @peterwilsoncc
10 months ago

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

In 55944:

KSES: Add support for CSS repeat() function.

Introduces support for the CSS repeat() function to support complex grid layouts.

Props isabel_brison, azaozz.
Fixes #58551.

#7 @milana_cap
9 months ago

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