How Can I Disable Responsive Font Sizes in Bootstrap 5?

Is there a way to disable responsive font sizes in BS5, since for BS5 the RFS button is not visible?

RFS is automatically enabled for Bootstrap 5, hence no need for the button. You can change the RFS behaviour by overriding the default Bootstrap style rules.

Taking <h1> as an example, see the style rules in the CSS panel.

This is for large screens and above:


This is for smaller screens:

To change the font size for smaller screens, use overriding style rules like:

h1, .h1 {
    font-size: 2.5rem !important;
}

Similar for the other H-elements.

1 Like

Thanks for that @ben!

Yes, in the end I created my own set of media queries to fix it, as my web site needs the smaller fonts to get bigger as the screen size goes down…