-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spacing & Typography fields' output CSS doesn't support value_pattern, prefix, suffix #1183
Comments
This one is a bit weird... Those are fields that return arrays of values. Any ideas on how we could differentiate those and make things more modular? |
Hi, I stumbled across this issue as I too would like to use value_pattern with the typography field and thought of a solution: As the theme_mod for the typography field is an array of key-values, couldn't we use the placeholder in the value_pattern like an array? Say for example that I want to calculate the font-size, then it would look like this:
All the typography properties would apply to .my-element like normal except the font-size that is overridden with the value_pattern. I don't know if it would be easy to implement or even simple enough to respect the KISS but keep in mind this is a simple suggestion. |
Fixed in 3.0 You should now be able to use something like this: 'output' => array(
array(
'element' => '.my-element'
),
array(
'element' => '.my-element2',
'property' => 'font-size',
'value_pattern' => 'calc($ / 2)',
'choice' => 'font-size',
),
); |
Hey @aristath, Also, any particular reason why you're using |
That was just a typo, fixed it in the above comment. |
Hi Ari,
Why Spacing & Typography fields output CSS doesn't support value_pattern, prefix, and suffix?
We might want to add
!important
assuffix
, or maybecalc()
as thevalue_pattern
.The text was updated successfully, but these errors were encountered: