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

Use variable for Headline scaling. #67

Open
splitbrain opened this issue Aug 6, 2018 · 1 comment
Open

Use variable for Headline scaling. #67

splitbrain opened this issue Aug 6, 2018 · 1 comment

Comments

@splitbrain
Copy link

The headlines are too big for my taste - but that's my taste only. It would be cool if I could specify the scale just like on http://type-scale.com/ using a variable and SASS would calculate the sizes according to that scale for me.

Would a pull request be welcome for that?

@splitbrain
Copy link
Author

The following should be enough to set the font-sizes. All other properties (line-height and margins) should probably be set in em (not rem) to be dependent on the size of the headline itself - this way the browser will take care of the calculations. type-scale.com is using em and setting the margins in rem could be considered a bug in furtive, I believe.

$scale: 1.414;

@for $i from 1 through 4 {
  $result: 1rem !default;
  $result: $result * $scale;
  
  h#{5-$i}, .h#{5-$i} {
    font-size: $result;
  }
}

small, .small {
  font-size: 1rem / $scale;
}

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

1 participant