Home>

I want to change the default font size
I use Bootstrap 4 with Rails5 app. It ’s not going well. The file to be changed may be inappropriate.
CSS/Bootstrap /p> Error message

There is no sign that the default size has changed.

Applicable source code
(application.js)
// = require jquery3
// = require popper
// = require jquery_ujs
// = require turbolinks
// = require_tree.
// = require bootstrap-sprockets
(application.scss)
@import "bootstrap";
@ font-size-base: 30px;#I have confirmed this by specifying a clearly large size here.
(application.html.erb) has been changed as follows.

    <% = yield%>
Supplemental information (language/FW/tool version etc.)

ruby ​​2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux-musl]
Rails 5.0.6 (development environment)
bootstrap (4.0.0.beta)
jquery-rails (4.3.1)

  • Answer # 1

    Try defining a variable before

    @import.

    $font-size-base: 50rem;
    @import "bootstrap";

Related articles