chanan / BlazorStrap

Bootstrap 4 Components for Blazor Framework
https://blazorstrap.io
The Unlicense
916 stars 157 forks source link

Custom bootstrap css #414

Closed carlhoogstoel closed 3 years ago

carlhoogstoel commented 3 years ago

Is there any chance we can get an overload on this to inject our own bootstrap css? We use an updated bootstrap css with custom colors. Or is there another way we haven't discovered yet?:)

setBootstrapCss: function (theme, version) { if (link === undefined) { link = document.createElement('link'); document.head.insertBefore(link, document.head.firstChild); link.type = 'text/css'; link.rel = 'stylesheet'; } if (theme === 'bootstrap') { link.href = "https://stackpath.bootstrapcdn.com/bootstrap/" + version + "/css/bootstrap.min.css"; } else { link.href = "https://stackpath.bootstrapcdn.com/bootswatch/" + version + "/" + theme + "/bootstrap.min.css"; } return true; },

chanan commented 3 years ago

Yes that can be added. If you wish to submit a PR that will help! :)

In the meantime, you don't have to use that function at all. Just add your style sheet in the head

carlhoogstoel commented 3 years ago

Ah sweet, will do that then. Sorry I haven't pulled your code otherwise !'d do the pull request. Just started rebuilding our app in Blazor. If your code works out good, i'll happily pull the code and do the PR.