how to change Bootstrap 5 fs-*
class in sass? because In the documentation only shows how to modify h-*
class such as h5-font-size
, but not the fs-*
class.
Asked
Active
Viewed 4,295 times
3

Jastria Rahmat
- 776
- 1
- 6
- 27
-
Please accept the answer so others know the question is solved! – Carol Skelly Jul 12 '21 at 18:27
1 Answers
6
You would modify the "font-size" utility using the Utilities API. Merge the new values with the existing $font-sizes map...
@import "functions";
@import "variables";
@import "utilities";
$font-sizes: (
1: 12rem,
2: 10rem,
3: 7rem,
4: 5rem,
5: 3rem,
6: 2rem,
);
$utilities: map-merge(
$utilities,
(
"font-size": map-merge(
map-get($utilities, "font-size"),
(
values: $font-sizes,
),
),
)
);
@import "bootstrap";
Related: Add new utilities with Bootstrap 5

Carol Skelly
- 351,302
- 90
- 710
- 624