Bootstrap: bg-variant() alternative?

Created on 27 Dec 2019  路  6Comments  路  Source: twbs/bootstrap

My code currently leverages bg-variant(). What is the suggested alternative? (Bootstrap v4.4.1)

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.

All 6 comments

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)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

markoheijnen picture markoheijnen  路  56Comments

METACEO picture METACEO  路  46Comments

SoftHai picture SoftHai  路  47Comments

lpilorz picture lpilorz  路  43Comments

sipi41 picture sipi41  路  37Comments