Vue. js plugin that allows you to pack CSS with your components

.vue-css.The Vue.js plugin produced by @nxtchg, vue-css is actually made for storing pertinent CSS along with.vue parts, allowing you to bundle CSS report with your parts.Vue components must be stand-alone devices with every little thing relevant inserted inside. Regrettably, Vue doesn’t support embedded styles. You can utilize Webpack or Browserify, but if you do not would like to, after that there is no suited service.

This plugin inserts on its own in addition to Vue.component() and also if there is a “type” member present in element’s meaning, it adds it to the webpage. All CSS selectors are actually prefixed with the title of the component to prevent conflicts.The CSS selectors are prefixed along with the label of the part, for example:.Vue.component(‘ my-component’,.theme: ‘Greetings, world!’,.style: ‘span,.this-too font-color: reddish ‘. ).The above arrangement will add.my-component span,.my-component.

this-too font-color: red to the webpage.Consumption.The plugin could be utilized merely by including the ‘vue-css. js’ documents right into your task.That’s it give vue-css a try out if you are trying to find an alternative way to assist embedded designs in your projects.