Skip to content

Typography field outputting font-weight & font-style #1591

@Webcreations907

Description

@Webcreations907

Hello,

Tried checking to see if this had been asked before, but couldn't find. Sorry new to Github so not sure how everything works here yet. :)

I'm trying to enter/add a typography field, just blank though no defaults set. So shouldn't output anything until one of the font fields are set, but it's outputting font-weight:normal; and font-style:normal; css.

I edited the field_typography.php file so it checks to see if font-family or font-weight was set so that it doesn't output that. But I know this will have to be done each time I update ReduxCore, so hoping it might get looked into. ;)

This is the field

array(
    'id'        => 'opts-typography-body',
    'type'      => 'typography',
    'title'     => __('Body Font', 'redux-framework-demo'),
    'subtitle'  => __('Specify the body font properties.', 'redux-framework-demo'),
    'google'    => true,
    'text-align' => false,
    'letter-spacing' => true,
    'font-backup' => true,
    'output'    => array('body')

)

And if you were to leave all fields blank/unchanged and save options, it would output the below in CSS

body{
font-weight:normal;
font-style:normal;
}

Below is link to changes made to field_typography.php file, if that's of any help.

https://gist.github.com/Webcreations907/80bf00a06cb2cfa9197e#file-field_typography-php-L685-L702
https://gist.github.com/Webcreations907/80bf00a06cb2cfa9197e#file-field_typography-php-L725-L737

Thanks, and you all are doing a GREAT job on this project. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions