redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

typography field problem with font-style

Open genethic opened this issue 12 years ago • 3 comments

If I add a font-style in the typography field or if don`t disable it by 'font-style' => false, both font-weight and font-style input field look like no default value. If I disable font-style, the font-weight field work well.

The value is saved is the correct but it doesn't appear in the field (if I click to select, the values are there).

This is my code: array( 'id'=>'body-font', 'type' => 'typography', 'title' => __('Body', 'redux-framework-demo'), 'google'=>true, 'output' => array('body'), 'line-height' => false, 'text-align' => false, 'font-style' => false, 'default' => array( 'color' => '#748796', 'font-size'=>'14px', 'font-weight'=> '400', 'font-family'=>'Open Sans', ), ),

genethic avatar Mar 03 '14 08:03 genethic

Well, I loaded your code and set font-style to true. The font weight drop down was set to 400, per your default. Style was blank because there is no default set for that in your code.

kprovance avatar Mar 03 '14 19:03 kprovance

But the problem is that if I put the font-style value, both font-style and font-weight are in blank. Like here: array( 'id'=>'body-font', 'type' => 'typography', 'title' => __('Body', 'redux-framework-demo'), 'google'=>true, 'output' => array('body'), 'line-height' => false, 'text-align' => false, 'default' => array( 'color' => '#748796', 'font-size'=>'14px', 'font-weight'=> '400', 'font-family'=>'Open Sans', 'font-style' => 'normal', ), ),

genethic avatar Mar 03 '14 19:03 genethic

Apparently, the subset style can't be set for a default. So, the take font-style => normal out, reset the section data, and the weight should show up.

kprovance avatar Mar 03 '14 23:03 kprovance