My code currently leverages bg-variant(). What is the suggested alternative? (Bootstrap v4.4.1)
Duplicate of #29895?
@florianlacreuse no, that issue had to do with big-variant() parameters, but did not discuss the suggested alternative.
Backgrounds are generated by the new utility API coming in v5. You'll want to use that API to make changes to what background utilities are generated. Alternatively, you can create your own mixins that extend these.
Why is it so hard to post a link or explanation? Now I get this annoying warning and need to spend a lot of time figuring out what to do
@mdo This should鈥檝e been deprecated in V5 since your proposed solution requires V5. If we have to do something differently for the interim, please please provide some additional explanation.
in v 4.5, the mixin takes a third argument $ignore-warning
. Simply set this to true to ignore the warning if you're not planning to upgrade to Bootstrap 5.
@mixin bg-variant($parent, $color, $ignore-warning: false)
Most helpful comment
@mdo This should鈥檝e been deprecated in V5 since your proposed solution requires V5. If we have to do something differently for the interim, please please provide some additional explanation.