Skip to content

Instantly share code, notes, and snippets.

@pravnkay
Last active March 14, 2020 16:12
Show Gist options
  • Save pravnkay/102d6a2cfc8d7827ccb6ff82f6f6ced6 to your computer and use it in GitHub Desktop.
Save pravnkay/102d6a2cfc8d7827ccb6ff82f6f6ced6 to your computer and use it in GitHub Desktop.
Custom theme support for Bootstrap-Vue

Custom theme support for Bootstrap-Vue

Versions used

@vue/cli 4.1.1

Using below commands to install bootstrap-vue, adds the plugin file and pre-fills the statements. Just have alook at them and edit them

vue create my-app
cd my-app
vue add bootstrap-vue
// location : src/plugins
// filename bootstrap-vue.js
// Link the created theme.scss
import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
Vue.use(BootstrapVue)
import '../assets/css/theme.scss';
// Add the below line to main.js
import './plugins/bootstrap-vue'
//Following will be autofilled by bootstrapvue
//Make sure of that
import '@babel/polyfill'
import 'mutationobserver-shim'
/* theme.scss
/*Somewhere in your assets folder
/*********************************/
$theme-colors: (
"primary": #1a73e8,
"secondary": #283043,
"airblue": #78a1bb,
"offwhite": #ebf5ee,
"success": #38946a
);
@import 'bootstrap/scss/bootstrap.scss';
@import 'bootstrap-vue/src/index.scss';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment