mmistakes / minimal-mistakes

:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
https://mmistakes.github.io/minimal-mistakes/
MIT License
12.41k stars 25.57k forks source link

Reduce posts font size using _variables.scss #1043

Closed z0ph closed 7 years ago

z0ph commented 7 years ago

Hi,

I'm trying to reduce the font size on my posts items using _variables.scss but it not applied properly. For me the font is too high.

image

Detailled Screenshot

I've used this settings to review the change, but nothing happen on my posts items. The font it's still the same size (too big for me)

/* type scale */
$type-size-1                : 0.50em !default;  // ~39.056px
$type-size-2                : 0.50em !default;  // ~31.248px
$type-size-3                : 0.50em !default;  // ~25.008px
$type-size-4                : 0.50em !default;  // ~20px
$type-size-5                : 0.50em !default;  // ~16px
$type-size-6                : 0.50em !default;  // ~12px
$type-size-7                : 0.50em !default;  // ~11px
$type-size-8                : 0.50em !default;  // ~10px

I've also tried to change $doc-font-size to 10

I've tried to : bundle exec jekyll clean bundle exec jekyll build

Without success yet. The font does not change in matters of size.

Maybe I made a minimal mistake :)

Thanks for your help.

Environment informations


mmistakes commented 7 years ago

See these lines in _reset.scss. I'd leave the variable font sizes alone and instead adjust the sizes in the reset. The theme scales the font sizes up/down globally depending on the width of the screen.

html {
  /* apply a natural box layout model to all elements */
  box-sizing: border-box;
  background-color: $background-color;
  font-size: 16px;

  @include breakpoint($medium) {
    font-size: 18px;
  }

  @include breakpoint($large) {
    font-size: 20px;
  }

  @include breakpoint($x-large) {
    font-size: 22px;
  }
}
z0ph commented 7 years ago

Hi @mmistakes ,

It's working, thanks a lot.

guillena commented 6 years ago

perfect!!!