How to change Bootstrap's global default font size?

后端 未结 6 1904
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 01:46

Bootstrap\'s global default font-size is 14px, with a line-height of 1.428. How can I change its default global settings?

Will I have to change bootstrap.min.css in

6条回答
  •  离开以前
    2020-12-08 02:32

    The recommended way to do this from the current v4 docs is:

    $font-size-base: 0.8rem;
    $line-height-base: 1;
    

    Be sure to define the variables above the bootstrap css include and they will override the bootstrap.

    No need for anything else and this is the cleanest way

    It's described quite clearly in the docs https://getbootstrap.com/docs/4.1/content/typography/#global-settings

提交回复
热议问题