[wp-trac] [WordPress Trac] #56353: Allow assigning CSS variables in safecss_filter_attr
WordPress Trac
noreply at wordpress.org
Fri Sep 9 12:38:03 UTC 2022
#56353: Allow assigning CSS variables in safecss_filter_attr
--------------------------------------+-----------------------------
Reporter: aristath | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.1
Component: Formatting | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"54117" 54117]:
{{{
#!CommitTicketReference repository="" revision="54117"
KSES: Allow assigning values to CSS variables.
The `safecss_filter_attr()` function allows using custom CSS variables
like `color: var(--color)`. However, it did not allow assigning values to
CSS variables like `--color: #F00`, which is common in Global Styles and
Gutenberg.
This commit adds support for assigning values to CSS variables, so that
the function can be used consistently in Global Styles and the future
Style Engine in Gutenberg.
Follow-up to [50923], [54100].
Props aristath, ramonopoly, SergeyBiryukov.
Fixes #56353.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56353#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list