Utility API option to toggle `!important` per utility
Created by: marconett
Currently, all utilities are generated with !important
by default (https://github.com/twbs/bootstrap/blob/b613c8dbb6c30e62adaefc669130549fd9c2e28b/scss/_variables.scss#L229).
The documentation for the Utility API is currently wrong, as the output example does not show !important
(https://github.com/twbs/bootstrap/blob/b613c8dbb6c30e62adaefc669130549fd9c2e28b/site/content/docs/5.0/utilities/api.md).
Especially when using utility classes together with css transitions, the !important
is an issue, as this will overwrite the value we want to transition to.
Changing the default $enable-important-utilities
to false
is not an option, as is also changes bootstraps internal utilities and could lead to unexpected behavior.
Therefore, I want to propose the ability to enable the !important
rule per utility.