Skip to content
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

Typography line-height normal #1814

Closed
anthonyryanrusso opened this issue Feb 22, 2018 · 4 comments
Closed

Typography line-height normal #1814

anthonyryanrusso opened this issue Feb 22, 2018 · 4 comments
Milestone

Comments

@anthonyryanrusso
Copy link

anthonyryanrusso commented Feb 22, 2018

Issue description:

Typography control doesn't allow line-height to be set to "normal"

Version used:

3.0.25

Using theme_mods or options?

theme_mods

Code to reproduce the issue (config + field(s))

Kirki::add_field($opt_name, array( 
    'label' => esc_html__('H1 heading typography'),
    'section' => 'general_typography_section',
    'settings' => 'h1_heading_typography',
    'type' => 'typography',
    'default' => array(
        'font-family' => 'Open Sans',
        'font-size' => '40px',
        'line-height' => 'normal',
        'text-transform' => 'none',
        'letter-spacing' => '0px',
        'color' => '#777'
    ),
    'output' => array(
        array(
            'element' => 'h1',
            'property' => 'typography'
        )
    )
));
@anthonyryanrusso
Copy link
Author

@aristath Any feedback on this?

@aristath
Copy link
Contributor

aristath commented Mar 5, 2018

Isn't normal the same as 1? (Unitless)

@anthonyryanrusso
Copy link
Author

anthonyryanrusso commented Mar 5, 2018

No unfortunately "1" is not the same as "normal".

According to the spec, a value of "normal" is not just a single concrete value that is applied to all elements, but rather computes to a "reasonable" value depending on the font size set (or inherited) on the element.

@aristath
Copy link
Contributor

Fixed. Problem was with the sanitization function 👍

@aristath aristath added this to the 3.0.26 milestone Mar 17, 2018
aristath added a commit that referenced this issue Mar 17, 2018
* develop: (73 commits)
  fixes #1730
  fixes #1830
  GDPR: Load webfont-loader locally
  Update fonts
  fixes #1834
  Apply WordPress Coding Standards
  Update kirki-helper-class.md
  see #1797
  cleanup unused vars
  See #1807
  Additional fix for #1809
  fixes #1828
  fixes #1808
  fix #1814
  fix #1797
  fixes #1809
  Update sortable.md
  fixes #1787
  update webfonts & grunt
  changelog
  ...

# Conflicts:
#	modules/postmessage/class-kirki-modules-postmessage.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants