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 font-size

See original GitHub issue

I’m getting an error that says I’m missing a mixin, however I just installed version 4.3.0

h1, .h1 { @include font-size($h1-font-size); }
                      ^
          No mixin named font-size
          in node_modules/bootstrap/scss/_type.scss (line 16, column 20)

I’m on Ubuntu using Webpack 4.8.3 and Yarn.

I also checked the source and it is indeed using a font-size mixin

h1, .h1 { @include font-size($h1-font-size); }
h2, .h2 { @include font-size($h2-font-size); }
h3, .h3 { @include font-size($h3-font-size); }
h4, .h4 { @include font-size($h4-font-size); }
h5, .h5 { @include font-size($h5-font-size); }
h6, .h6 { @include font-size($h6-font-size); }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
MartijnCuppenscommented, Feb 12, 2019

@EddyVinck, you could also just include this file which includes all mixins Bootstrap uses:

@import "~bootstrap/scss/mixins";

Anyway, I’m going to close this since your problem seems to be solved now.

4reactions
EddyVinckcommented, Feb 12, 2019

Yes, that’s it! Thanks! After adding that import I also got the error for the deprecate mixin, so this is what I had to do to fix all my errors:

// Vendor
@import "~bootstrap/scss/vendor/rfs";

// Deprecate
@import "~bootstrap/scss/mixins/deprecate";

Unrelated, but VSCode (insiders build) also wasn’t being helpful. I tried searching my node_modules/bootstrap folder for “@mixin font-size” and nothing came up, even though the mixin is declared in node_modules/bootstrap/scss/vendor/_rfs.scss on line 198.

image VSCode info Version: 1.32.0-insider Commit: 709bf352b12de8284683bef94cb5984129bfc776 Date: 2019-02-08T14:50:08.266Z Electron: 3.1.3 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Linux x64 4.15.0-45-generic

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap 4.3.1 Upgrade: No mixin named font-size
I have an Angular project that was running Bootstrap 4beta. I upgraded via command line npm install bootstrap --save to the latest Bootstrap ......
Read more >
Mixing error msg - HTML-CSS - The freeCodeCamp Forum
So I've ran into same problem with with mixin and message while compiling " no mixing named…" no matter I created it and...
Read more >
Bootstrap 4.3.1 Upgrade: No Mixin Named Font-Size - ADocLib
Bootstrap 4.3.1 Upgrade: No Mixin Named Font-Size. css file contains the core styling plus all of the icon styles that you'll need when...
Read more >
Sass Mixins - LearnHowToProgram.com
Mixins allow you to define styles that can be re-used throughout the stylesheet without needing to resort to non-semantic classes like .float-left ....
Read more >
error: no mixin named focus-border office ui fabric react.Issue ...
1 Answer 1 · Copy and paste the content of List. · Make sure that at the top of your SCSS, you have...
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