问题:
使用bootstrap5 utilities api总是失败,查找原因需要引入bootstrap/scss/utilities/api
There is a change in file structure in BS5 (vs. BS4).
The
_utilities.scss
file now only creates a variable$utilities
holding all the … utilities. Another fileutilities\_api.scss
, when compiled, generates the utility CSS.
解决:
1 2 |
@import "../node_modules/bootstrap/scss/utilities"; @import "../node_modules/bootstrap/scss/utilities/api"; |
参考:
Bootstrap 5: Can not use utilities