Skip to content

bootstrap 4 customization requires scss #92

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

Closed
btmadison opened this issue Feb 8, 2017 · 5 comments
Closed

bootstrap 4 customization requires scss #92

btmadison opened this issue Feb 8, 2017 · 5 comments

Comments

@btmadison
Copy link

Loading of Bootstrap 4 is hardcoded to the css cdn in _Layout.cshtml. Is there a way to instead use the scss from node modules and elsewhere provide a _custom.scss file to provide default overrides to allow re-theme of colors and other options.

@MarkPieszak
Copy link
Member

Definitely!
Right now we just have it setup to at least apply the styles, there were some issues with webpack2 with bootstrap & fontawesome that I was looking into. (Related #84)
Ideally we definitely want it to be completely configurable like that!

There are a few options when it comes to setting it up (one being: https://github.com/shakacode/bootstrap-loader)

@btmadison
Copy link
Author

I am not sure if this is a hack, but I have found if I enable scss loading, and remove the imports from the cshtml - instead of loading the scss in the vendor scripts, I have just placed the import in the root app component styleUrls listed app.component.scss file, and set the encapsulation mode to ViewEncapsulation.None, thus setting the bootstrap generated css available to the whole application. Additionally the ncie thing I find about this is isntead of adding the variable resets to the _custom file, I can add the resets in the same file before doing the @import, thus giving full configuration.

@MarkPieszak
Copy link
Member

Oh great, so you have it working? 💯
Do you want to make a PR to add the functionality in?

@MarkPieszak
Copy link
Member

@btmadison Apologies for the crazy delay, it's been absolutely crazy these past many weeks with all the changes going on, but I'm actually going to make this a standard for the repo (bootstrap w/ scss for theme-ing)

@MarkPieszak
Copy link
Member

MarkPieszak commented Apr 4, 2017

Merged in, we now have Bootstrap with SCSS built-in :) #151
ng2-bootstrap again as well!

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

No branches or pull requests

2 participants