Make WordPress Core

Opened 8 years ago

Closed 5 years ago

Last modified 5 years ago

#37248 closed enhancement (fixed)

KSES: Flex Properties for the List of Safe CSS Attributes

Reported by: mrahmadawais's profile mrahmadawais Owned by: peterwilsoncc's profile peterwilsoncc
Milestone: 5.3 Priority: normal
Severity: normal Version: 4.6
Component: Security Keywords: has-patch has-dev-note
Focuses: ui, administration, template Cc:


As per the discussion in #35877 with @jeremyfelt, KSES can have all the Flex Properties for the List of Safe CSS Attributes. Which is not the case at the moment. The patch along with this tickets solves that problem.

So now all the flex properties with their prefixes would be safe CSS attributes for inline styles.

Attachments (1)

37248.patch (3.4 KB) - added by mrahmadawais 8 years ago.
KSES: Flexbox Properties for the List of Safe CSS Attributes

Download all attachments as: .zip

Change History (9)

8 years ago

KSES: Flexbox Properties for the List of Safe CSS Attributes

#1 @mrahmadawais
8 years ago

  • Keywords has-patch dev-feedback added

#2 @mrahmadawais
8 years ago

  • Component changed from General to Security
  • Focuses administration added

This ticket was mentioned in Slack in #core-editor by jeremyfelt. View the logs.

7 years ago

#4 @desrosj
6 years ago

Related #24157.

#5 @peterwilsoncc
5 years ago

In 45363:

KSES: Add flex and related long form properties to safe CSS.

Allow flex, flex-grow, flex-shrink and flex-basis to be used in inline CSS. As of WordPress 5.3 the block editor is expected to use flex-basis inline to set the width in the column block.

Props aduth.
Fixes #47281.
See #37248.

#6 @peterwilsoncc
5 years ago

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

In 46235:

KSES: Add support for modern layout techniques in style attribute.

Adds support for flex, grid and column layout techniques to the list of CSS attributes considered safe for inline CSS. The \ character and CSS functions, eg minmax() are not yet supported.

Extends support of border properties to include border-radius and individual background properties to include all those implicitly supported by the shorthand attribute.

Props mrahmadawais, marybaum, birgire, peterwilsoncc, azaozz.
Fixes #37248.
See #47367.

#7 @desrosj
5 years ago

  • Milestone changed from Awaiting Review to 5.3

#8 @desrosj
5 years ago

  • Keywords has-dev-note added; dev-feedback removed

Mentioned in the Miscellaneous Developer Focused Changes dev note for 5.3:

Note: See TracTickets for help on using tickets.