-
Notifications
You must be signed in to change notification settings - Fork 43
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
Problem with base font and responsive #39
Comments
Typi is designed such that your font-sizes for other maps are always relative to the If you want to set your sizes manually, (hence the pixels), your best bet is to calculate either the Am I making sense? Sorry for the confusion. |
Hej, i think, i have the same problem. My setup with
Compiled to
Thats correct, but if i change the Does Typi work correctly or is this a bug. |
@tbaddade When you use When you set to |
I'm pretty sure this used to work as mercs600 intended. I've used it myself on several projects stating pixel values and its calculated the correct font-size in rems. I've recently updated to the latest version and now im having to state the new maps in ems to get the correct pixel values. |
@adamrobinson The approach is NOT to think in pixel values for now. It's probably easy to get messed up. If you can, think in em immediately. I'll try to find a way to fix this inconsistency as soon as I get time on my hands, but I don't know when I'll have time :( |
@zellwk thanks for a great library, using it for the first time here. Just to add, I've run into the same problem that tbaddade describes. |
@christopherdarling Got you. I'll find time to work on it soon. I'm so ashamed that I haven't found time in so long >< |
No worries - totally appreciate it's difficult to make time sometimes. Thanks for replying so quickly |
Hi,
typi is awesome library. I'm using it in my second project and I have one issue.
I set base font-size as 15px; $typi map below, where base is 15px and sm is 13px;
$typi: ( base: ( null: ( map-get($font-sizes, 'base'), map-get($line-heights, 'base') ), xs: ( map-get($font-sizes, 'xs'), map-get($line-heights, 'xs') ), sm: ( map-get($font-sizes, 'sm') map-get($line-heights, 'sm') ), ..... );
I have also second map for headings.
$headings-sizes: ( h1: ( null: (30px, 39/30), // default is xs sm: (22px, 28/22), md: (36px, 48/36), ), h2: ( null: (22px, 22/29), // default is xs sm: (15px, 22/15), md: (24px, 36/24) ), ..... );
Next I merge it to one $typi map
$typi: map-merge(map-merge($typi, $headings-sizes)
I'm using typi with em units.
h1, .h1 { @include typi(h1, $rem: false, $typi-breakpoint: mappy-bp); }
So... when comes to my problem:
default case: my H1 as base has 30px and base font size is 15, so H1 has 2em and this is ok.
rwd case for example on SM breakpoint where my H1 has 22px and base font-size has 13px; so H1 should be around 1.692em, but I got 1.46667em;
My question is how can I fix it ? ;-)
The text was updated successfully, but these errors were encountered: