I'm attempting to use the bootstrap 4 styles. We have an angular-cli projects and inside the angular-cli.json file I've added the following to my styles.
"styles": [
"../node_modules/bootstrap/scss/bootstrap.scss",
"../node_modules/ngx-toastr/toastr-bs4-alert.scss",
For whatever reason, when I run ng build I end up getting the error message "No mixin named border-radius". I made sure to put them in the correct order, but for whatever reason, it does not want to build properly. Any ideas?
I think with the variables I used from bootstrap, they have to both be imported into a single scss file in your project and then that gets loaded by angular-cli
Thank you. that appears to be the issue I'm having. It's not respecting the
order they're placed into the cli config file. Thanks!
On Thu, Jan 18, 2018 at 11:13 AM, Scott Cooper notifications@github.com
wrote:
I think with the variables I used from bootstrap. They have to both be
imported into a single scss file in your project and then that gets loaded
by angular-cli—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/scttcper/ngx-toastr/issues/318#issuecomment-358696168,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGDtPU4j1G694FAubcHCt6XLqEcHR9M9ks5tL22ogaJpZM4RjJ0S
.
I have same issue, would you please describe it more
In your styles.scss import bootstrap (or just bootstrap variables) then import the scss in this library.
example:
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
// or
@import "~bootstrap/scss/bootstrap";
// then import toastr scss
@import "~ngx-toastr/toastr-bs4-alert.scss";
If you don't have styles.scss and instead just have styles.css, just rename it to styles.scss and then restart angular-cli
Thanks for fast response
Adding @import '~bootstrap/scss/bootstrap'; solved the issue
FYI Adding functions and variables will cause the below error as well
Argument '$color' of 'darken($color, $amount)' must be a color
That's right, if you don't want to bring in all of bootstrap, you'd need to bring in the mixins as well as the variables and functions. I forgot about that one
Most helpful comment
In your
styles.scssimport bootstrap (or just bootstrap variables) then import the scss in this library.example:
If you don't have styles.scss and instead just have styles.css, just rename it to
styles.scssand then restart angular-cli