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

Responsive line-height with default parameters does not work #30

Open
pmendelski opened this issue Nov 25, 2017 · 6 comments
Open

Responsive line-height with default parameters does not work #30

pmendelski opened this issue Nov 25, 2017 · 6 comments
Labels

Comments

@pmendelski
Copy link

Hi. I'm using postcss-responsive-type@1.0.0.
I just wanted to use responsive line-height.

html {
  line-height: responsive;
}

Unfortunately it generates an error:

postcss-responsive-type: $FILE_PATH/default.css:5:1: this combination of units is not supported

and invalid css:

html {
  line-height: calc(1.2em + 0.6000000000000001 * ((100vw - undefined) / NaN));
}

@media screen and (min-width: 1280px) {
  html {
    line-height: 1.8em;
  }
}

@media screen and (max-width: 420px) {
  html {
    line-height: 1.2em;
  }
}
@madeleineostoja
Copy link
Owner

Hmm, not sure what's going on here. Tests should be catching this, I'll try to repro locally and look into it

@jenshedqvist
Copy link

I go the exact same problem with the same version. I've tested with px and em.

@ackushiw
Copy link

Adding the following solved it for me

  lower-line-height-range: 26em;
  upper-line-height-range: 80em;

@elliott-impression
Copy link

elliott-impression commented Aug 14, 2018

Bump. I get the same issue. I can work with px, however, when I use em values I get the same this combination of units is not supported error.

@iljapanic
Copy link

I get the same error when using em units but the CSS seems to compile correctly.

@iljapanic
Copy link

After playing around with the settings I would argue this is correct behaviour. If you set your font-size using px then you need to set your line-height with px as well and vice versa for em and rem.

A support for unitless line-height would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants