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

Problem with rootsizes #39

Closed
davidealbanese opened this issue Mar 3, 2017 · 4 comments
Closed

Problem with rootsizes #39

davidealbanese opened this issue Mar 3, 2017 · 4 comments

Comments

@davidealbanese
Copy link

davidealbanese commented Mar 3, 2017

Dear @daviddarnes,
I would like to change the fontsizes, but changes in rootsizes (in file _variables.scss) seem to affect only the line-height, not the fontsizes.

E.g.:

$rootsizes: (
  rootsize-0: 5,   // 24px line-height body text
  rootsize-1: 5,   // 28px line-height body text
  rootsize-2: 5,   // 30px line-height body text
  rootsize-3: 5,   // 34px line-height body text
  rootsize-4: 5    // 38px line-height body text
) !default;
@daviddarnes
Copy link
Owner

Hi @davidealbanese!
Hmm, that doesn't seem right. I looked at the Sassline docs and that appears to be the right way to change the font sizing. Maybe I'm not implementing it correctly? You can change the overall font size with :root { font-size: 10px } but I don't think that's the right way?

@daviddarnes
Copy link
Owner

daviddarnes commented Mar 3, 2017

Edit: I've found that using the following works even better as it gives a wider spectrum of sizing while keeping the typographic scaling:

:root {
    font-size: 70%; // 0px                    ~ Mobile first
    @include breakpoint(break-1) { // 640px   ~ Small tablet up
      font-size: 70%;
    }
    @include breakpoint(break-2) { // 800px   ~ Large tablet up
      font-size: 80%;
    }
    @include breakpoint(break-3) { // 1024px  ~ Desktop up
      font-size: 90%;
    }
    @include breakpoint(break-4) { // 1600px  ~ Large desktop up
      font-size: 100%;
    }
}

Note that this percentages were made up just on the fly, recommend you check how they look at different browser sizes for readability and so on.

I realise that this bypasses Sassline in a somewhat cheeky manner, but this is far simpler than running through the whole process of getting the precise setup using the Sassline docs.

@davidealbanese
Copy link
Author

Dear @daviddarnes, thank you!

@LuxMiranda
Copy link

This saved my life, thank you.

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

3 participants