Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/wp-includes/kses.php
Original file line number Diff line number Diff line change
Expand Up @@ -3693,6 +3693,7 @@ function kses_init() {
* and URLs in the SVG element reference properties.
* @since 7.2.0 Added support for CSS anchor positioning properties and `text-shadow`.
* Added support for `background-clip`.
* Added support for `box-sizing`.
*
* @param string $css A string of CSS rules, decoded from an HTML `style` attribute.
* @param string $deprecated Not used.
Expand Down Expand Up @@ -3878,6 +3879,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
'left',
'z-index',
'box-shadow',
'box-sizing',
'aspect-ratio',
'container-type',

Expand Down
5 changes: 5 additions & 0 deletions tests/phpunit/tests/kses.php
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,11 @@ public function data_safecss_filter_attr() {
'css' => 'text-shadow: var(--wp--preset--text-shadow--soft)',
'expected' => 'text-shadow: var(--wp--preset--text-shadow--soft)',
),
// `box-sizing` introduced in 7.2.0.
array(
'css' => 'box-sizing: border-box',
'expected' => 'box-sizing: border-box',
),
// Expressions are not allowed.
array(
'css' => 'height: expression( body.scrollTop + 50 + "px" )',
Expand Down
Loading