Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "No mixin named -assert-ascending error" in bootstrap/scss/_variables.scss #23451

Closed
sushant24 opened this issue Aug 15, 2017 · 6 comments
Labels

Comments

@sushant24
Copy link

Getting this error when directly importing bootstrap/scss/_variables.scss -

@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); ^ No mixin named -assert-ascending

@mdo
Copy link
Member

mdo commented Aug 15, 2017

Make sure you're including _functions.scss. That's where that is defined. https://github.com/twbs/bootstrap/blob/v4-dev/scss/_functions.scss

@mdo mdo closed this as completed Aug 15, 2017
@brajeshsipl
Copy link

@mdo i checked my _functions.scss there is function name _assert-ascending but error is below

@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
No mixin named -assert-ascending

@jenkijo
Copy link

jenkijo commented Nov 28, 2017

I've same error

@kimmoh70
Copy link

I added following

@import '~bootstrap/scss/functions', '~bootstrap/scss/variables';

in my main scss file to overcome this issue.

@janekolszak
Copy link

...and add the include before your variables ;)

@amo13
Copy link

amo13 commented Jan 7, 2024

For anyone landing here while having that problem:
I also was able solve it by importing functions.scss and variables.scss (and variables_dark.scss), but I had to put these files into a subfolder of app/assets/stylesheets. So I downloaded them off this repo and put them into app/assets/stylesheets/bootstrap named beginning with an underscore, e.g. _variables.scss.
My application.scss not looks like this:

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 */

@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/variables_dark";

// here my customizations
$body-bg: $black;

@import "bootstrap";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants