0
0
Fork 0

Add a mixin to be able to fetch the values from CSS variables.

This commit is contained in:
Tyler-A 2020-08-02 16:13:17 -06:00
parent 5ac6e47cb2
commit 4b9a978d28

View file

@ -3,6 +3,16 @@ import App from './App.vue';
Vue.config.productionTip = false;
// global mixings
Vue.mixin({
methods: {
css_var(var_name) {
return getComputedStyle(document.documentElement).getPropertyValue(var_name);
},
}
});
// eslint-disable-next-line
const app = new Vue({
render: h => h(App),