-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Use relative size for fonts and line-height #103
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
Conversation
@DirtyF I think it would be better if we create a |
@ashmaroli I implemented your suggestion, we could also abstract values and use a typographic modular scale and make it easier for users to change typography for instance, but I don't feel like it's the intent of this theme. |
I think you misunderstood my intent. I was thinking more along the lines of: $base-font-size: 16; /* no units */
@mixin font-size($size) {
font-size: 0px + $size; /* fallback for older-browsers */
font-size: 0rem + $size / $base-font-size;
} body {
font-size: 0px + $base-font-size;
}
/* use mixin on all other elements. */
h1 {
@include font-size(32) /* just the size in px. no units */
} will yield: h1 {
font-size: 32px; /* fallback for older-browsers */
font-size: 2rem;
} |
yes I saw that codepen tutorial, we can go with |
I was not aware of the modular scale even though it seems to have been around for years. Thank you for the links. |
@benbalter #78 was a good start, this PR applies the same principle to other font-size declarations. The mixin is just the way to keep it DRY. |
@jekyllbot: merge +minor. Thanks @DirtyF! |
Merge pull request 103
Fix #102