WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 months ago

Last modified 6 weeks ago

#37248 closed enhancement (fixed)

KSES: Flex Properties for the List of Safe CSS Attributes

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

Description

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 3 years ago.
KSES: Flexbox Properties for the List of Safe CSS Attributes

Download all attachments as: .zip

Change History (9)

@mrahmadawais
3 years ago

KSES: Flexbox Properties for the List of Safe CSS Attributes

#1 @mrahmadawais
3 years ago

  • Keywords has-patch dev-feedback added

#2 @mrahmadawais
3 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.


2 years ago

#5 @peterwilsoncc
6 months 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
2 months 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
2 months ago

  • Milestone changed from Awaiting Review to 5.3

#8 @desrosj
6 weeks ago

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

Mentioned in the Miscellaneous Developer Focused Changes dev note for 5.3: https://make.wordpress.org/core/2019/10/15/miscellaneous-developer-focused-changes-in-5-3/

Note: See TracTickets for help on using tickets.