Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#54322 new enhancement

Add Logical Properties to safecss_filter_attr

Reported by: wazeter's profile wazeter Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.8.1
Component: Formatting Keywords: dev-feedback 2nd-opinion
Focuses: css Cc:



CSS Logical Properties and Values give easier control over automating different writing mode formats by using logical, rather than physical directions. In other words, it means that the intended spacing, sizing, etc for each appropriate side of a box element translate seamlessly.

Mozilla Reference:

With the increase in inline styling from blocks, it's important to add more flexibility to how a theme or plugin developer might want to style their spacing components or future proof them as accessibility and internationalization become increasingly important and stop of mind.

Global usage is at a decent enough support level where it makes sense:

Proposed Enhancement

The proposed addition would just be to add to the properties to the default array in safecss_filter_attr().

File: wp-includes/kses.php:

The complete list of Logical Properties:

        // Properties for sizing

        // Properties for borders

        // Properties for margin & padding

        // Properties for float & positioning

        // Other Misc Props

Change History (4)

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Formatting

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.

3 years ago

#3 @ryokuhi
3 years ago

  • Focuses css added; accessibility removed

Hello @wazeter: welcome on WordPress Trac and thank you for your suggestion.

We've reviewed this ticket today during the Accessibility Team's weekly bug-scrub. In our opinion, this is not an accessibility issue and, as such, I'm removing the related focus.

Still, we think that this ticket is worth discussion, so we're adding the CSS focus which we think is more in line with the suggested enhancement.

#4 @wazeter
3 years ago

@ryokuhi Sounds great! This also reminded me to submit a pull request, would you like me to do so?

Note: See TracTickets for help on using tickets.