zellwk / typi

A sass mixin to make responsive typography easy
MIT License
856 stars 44 forks source link

Incorrect line height calculated on typi-init function #28

Closed trafiq closed 7 years ago

trafiq commented 7 years ago

Hi. Just starting with 3.0 and notice that when I set the following base values and output @include typi-init; on my HTML CSS selector:

$typi: (
  base: (
    null: (16px, 1.5),
    tablet: (18px),
    desktop: (20px)
  )
);

I don't get this as expected:

font-size: 100%;
line-height: 1.5em;

I get just this instead:

line-height: 1.15

font-size: 100% is missing. Also, the line-height shows the wrong value and is missing the em unit.

Any ideas what might be causing this?

trafiq commented 7 years ago

Apologies. I just realised my mistake. I was including typi-init within my HTML CSS selector as per version 2. I realise the selector is now part of the function and therefore not required.

So just this:

@include typi-init;

And not this:

html {
  @include typi-init;
}

Closed as works as expected.

zellwk commented 7 years ago

@trafiq 👍