question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No mixin named border-radius

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
trevor-hackettcommented, Apr 12, 2018

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

2reactions
RezaRahmaticommented, Apr 13, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

no mixin named roboto-family Backtrace: src/pages/forms ...
You can even pass in values to make your mixin more flexible. A good use of a mixin is for vendor prefixes. Here's...
Read more >
Sass Mixins - LearnHowToProgram.com
Mixins are blocks of Sass that can be defined once, then called and reused in ... without needing to resort to non-semantic classes...
Read more >
How to Use Mixins in Sass and Pass Arguments – With Code ...
An argument is the name of a variable which is separated by a comma. ... In a regular mixin (and by regular I...
Read more >
border-radius scss mixin - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >
Sass: @forward
The @forward rule loads a Sass stylesheet and makes its mixins, functions, ... But those names might not make sense outside the module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found