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

FlowType not working with pixels? What am I missing? #47

Open
alvarotrigo opened this issue Feb 18, 2015 · 4 comments
Open

FlowType not working with pixels? What am I missing? #47

alvarotrigo opened this issue Feb 18, 2015 · 4 comments

Comments

@alvarotrigo
Copy link

As there are no examples available to download to compare with, I'm not quite sure what I'm missing.
It would be a good idea to have a folder with examples. There's not even a fiddle or a codepen of its usage on the docs...

Here's a reproduction of what I'm trying to do.
I can see the font-size inline attribute being applied to the parent, but it doesn't seem to have any effect on the child elements.

It seems it only works when applying em instead of px to the element i want to make resizable.
Nothing is mentioned in the docs about having to use em instead of pixels. So not sure if this is a must or not...

Here's the same version but working as expected when using em units instead.

I've seen some other demos which doesn't seem to be working either.

What am I missing?

@alvarotrigo alvarotrigo changed the title FlowType not working. What am I missing? FlowType not working with pixels? What am I missing? Feb 18, 2015
@jdgraffam
Copy link
Member

You need to include FlowType.js in your JSFiddle.

@alvarotrigo
Copy link
Author

@jdgraffam it is there. Take a look at the left panel under the External Resources section.

@jdgraffam
Copy link
Member

Sorry, duh. Try this: http://jsfiddle.net/b51h4wcc/

Don't declare font-size on the h2.

@alvarotrigo
Copy link
Author

Then I assume these lines in the Set Typography Base section of the docs are not correct when dealing with px, right?

body {
   font-size: 18px;
}

h1,h2,h3,h4,h5,h6,p {
   line-height: 1.45;
}

h1 { font-size: 4em; }
h2 { font-size: 3em; }
h3 { etc...

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