After making changes to angular.json to use less as the styleext, I tested it by creating a component. However, now I want to incorporate Bootstrap classes into my component's css/less. I specifically want all buttons in my component to have the .mx-1 class.
In my less file, I added:
.btnmx-1{
.btn();
.mx-1();
}
Unfortunately, this did not work as expected. I also tried importing Bootstrap's css file:
@import "../../../../node_modules/bootstrap/dist/css/bootstrap.min.css";
.btnmx-1{
.btn();
.mx-1();
}
However, this also failed to compile with the error message: .btn is undefined
Can anyone help me fix this? I need to ensure that all buttons in my component inherit the margin left and right of 1px from Bootstrap.