Make WordPress Core

Opened 4 weeks ago

Closed 12 days ago

Last modified 12 days ago

#61536 closed defect (bug) (fixed)

Add opacity as an allowed attribute to safecss_filter_attr()

Reported by: sunil25393's profile sunil25393 Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.7 Priority: normal
Severity: normal Version:
Component: Formatting Keywords: has-patch
Focuses: Cc:


Updated the overlay control to accept any value from 1 to 100 rather than multiples of 10. To accomplish this, we introduced an inline opacity style to block. However, because the safecss_filter_attr() method does not allow this property, it will be erased when inline styles are output using the get_block_wrapper_attributes() function, for example.

This ticket is for tracking the PHP backport for the following Gutenberg PR:

Change History (5)

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

4 weeks ago

  • Keywords has-unit-tests added

#2 @sunil25393
4 weeks ago

  • Keywords has-unit-tests removed

#3 @SergeyBiryukov
12 days ago

  • Milestone changed from Awaiting Review to 6.7
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @SergeyBiryukov
12 days ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 58709:

KSES: Add opacity to the list of safe CSS properties.

Original PR from Gutenberg repository:

Reference: MDN Web Docs: opacity.

Props sunil25393, wildworks, poena, Mamaduka, presstoke.
Fixes #61536.

@SergeyBiryukov commented on PR #6943:

12 days ago

Thanks for the PR! Merged in r58709.

Note: See TracTickets for help on using tickets.