wp_get_global_styles
: return values instead of CSS Custom Properties
#49712
Labels
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Type] Enhancement
A suggestion for improvement.
Related #49693 #45171
What problem does this address?
The
wp_get_global_styles
function returns the content in thetheme.json
.For example, for a content such as:
The expected result is:
Some environments don't have support for CSS Custom Properties. For example, mobile or email templates. They have to parse the content to understand it and convert it to a value they can use.
What is your proposed solution?
There are two alternatives we could explore to help them use
theme.json
provided values:wp_get_global_styles
that tells the function to resolve the CSS Custom Properties to the value they reference.wp_get_global_styles_values
, that does the same.The text was updated successfully, but these errors were encountered: