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

Include custom themes #34

Open
pochemuto opened this issue Nov 29, 2016 · 2 comments
Open

Include custom themes #34

pochemuto opened this issue Nov 29, 2016 · 2 comments

Comments

@pochemuto
Copy link

pochemuto commented Nov 29, 2016

How to include custom bootstrap theme?
I downloaded theme from https://bootswatch.com. It contains two files: bootswatch.less and variables.less.

I had placed its in app folder and imported from bootstrap.config.less

@import "./theme/lumen/variables";
@import "./theme/lumen/bootswatch";

Theme changed but it looks broken. Maybe bootswatch.less overrides bootstrap styles and should be imported last ?

There is my configuration: https://github.com/pochemuto/mortgage

@pochemuto
Copy link
Author

Issues was with redundant import bootstrap-webpack in js code:
import "bootstrap-webpack";

@pochemuto
Copy link
Author

So, yes. The problem is there. Import was redundant but removing them didn't help.
The problem is related that ticket #23

I found workaround:
create somewhere in your app folder bootstrap.less file with following content:

@import "~bootstrap/less/mixins";
@import "theme/lumen/variables";
@import "theme/lumen/bootswatch";

bootswatch requires variables and last one might have bootstrap dependencies. In my case it was mixins.

Add file path to entry in webpack.config.js:

module.exports = {
    context: __dirname + "/app",
    entry: ['!!bootstrap-webpack!../bootstrap.config.js', './client/index.ts', './client/css/bootstrap.less'],
    output: ...

And then it will work.

@pochemuto pochemuto reopened this Nov 30, 2016
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

1 participant