wordpress-develop icon indicating copy to clipboard operation
wordpress-develop copied to clipboard

Customizer: Allow arbitrary custom CSS

Open sirreal opened this issue 3 weeks ago • 10 comments

  • Allow arbitrary text in Customizer custom CSS.
  • Protect the CSS data from mangling by KSES HTML filters.

Under some circumstances KSES would run post content filters and change the resulting content like this:

 @property --animate {
-  syntax: "<custom-ident>";
+  syntax: "";
   inherits: true;
   initial-value: false;
 }

✅ Merged in [61418]. ~This depends on #10656 to ensure styles output is safely printed in the HTML (merged here).`

r61486 relaxed CSS content checks for Global styles with some additional restrictions that do not apply here.

Trac ticket: https://core.trac.wordpress.org/ticket/64418


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

sirreal avatar Dec 29 '25 15:12 sirreal