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

Bootstrap 4 - offcanvas menu compiler erros FIXED #568

Open
pedroscursel opened this issue Oct 6, 2017 · 0 comments
Open

Bootstrap 4 - offcanvas menu compiler erros FIXED #568

pedroscursel opened this issue Oct 6, 2017 · 0 comments
Milestone

Comments

@pedroscursel
Copy link

Hello Guys,
I will have the same error related here, but i Fix it adding some var's on the scope of my "build.scss".

In my case, I only need the canvas menu effect, so, I start to import the source to my file build.scss.

@import './node_modules/jasny-bootstrap/scss/variables'; 
@import './node_modules/jasny-bootstrap/scss/grid-container-smooth'; 
@import './node_modules/jasny-bootstrap/scss/navmenu'; 
@import './node_modules/jasny-bootstrap/scss/offcanvas';

But it aways crashed my compiler (webpack or gulp).
So I followed the erros and start to add the missed vars directly on my build.scss:

$grid-float-breakpoint:     	                768px;
$grid-gutter-width:       		        30px;
$screen-xs:             		 	480px;
$screen-sm:              			768px;
$screen-md:              			992px;
$screen-lg:              			1200px;
$screen-xs-min:          			$screen-xs;
$screen-sm-min:          			$screen-sm;
$screen-md-min:          			$screen-md;
$screen-lg-min:          			$screen-lg;
$screen-xs-max:          			($screen-sm-min - 1);
$screen-sm-max:          			($screen-md-min - 1);
$screen-md-max:          			($screen-lg-min - 1);
$container-lg:              	                ((1140px + $grid-gutter-width));
$container-smooth:          	                $container-lg;
$navbar-padding-horizontal: 	                floor(($grid-gutter-width / 2)) !default;
$border-radius-base:    			4px !default;
$font-size-base:          		        14px !default;
$font-size-large:         		        ceil(($font-size-base * 1.25)) !default; // ~18px
$font-size-small:         		        ceil(($font-size-base * 0.85)) !default; // ~12px
$line-height-base:    			        1.428571429 !default; 
$line-height-computed:			        floor(($font-size-base * $line-height-base)) !default; 

@import './node_modules/jasny-bootstrap/scss/variables'; 
@import './node_modules/jasny-bootstrap/scss/grid-container-smooth'; 
@import './node_modules/jasny-bootstrap/scss/navmenu'; 
@import './node_modules/jasny-bootstrap/scss/offcanvas';

And the code WORKS PERFECTLY!
So, I hope it help you guys :)

### tip for beginners: My build.scss file, has the bootstrap 4 imported (by demand, but is no problem if you have all bootstrap.scss source). Don't forget it, without bootstrap, it not works!

@jasny jasny added this to the v4 :heart: milestone Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants