I recently started the process of customizing Bootstrap for a project. We're on Bootstrap v5.1.1 for what it's worth.
I understand that because of !default
I need to define my customizations before importing Bootstrap variables. I've run into an issue where I want to use a default variable to define a customization. More specifically I'm trying to set $btn-font-weight
to bold. The line I tried is: $btn-font-weight: $font-weight-bold;
. This doesn't work because I'm not customizing $font-weight-bold
so it doesn't get defined until importing Bootstrap's defaults.
I found this question which recommends copying the Bootstrap variable as-is into the customization sass, but the answer is 6 years old so I'd like to know if there's a better way.