euvl / vue-js-grid

:bento: Vue.js 2.x responsive grid system with smooth sorting, drag-n-drop and reordering
https://euvl.github.io/vue-js-grid/
MIT License
951 stars 109 forks source link

Extract css into a separate file #6

Closed cristijora closed 7 years ago

cristijora commented 7 years ago

From what I see, the css is bundled together inside the final js output. This can be an issue if you want to customize the css later on. Also there is some css directly on the body https://github.com/euvl/vue-js-grid/blob/master/src/Grid.vue#L228

euvl commented 7 years ago

Hey @cristijora,

Good point, and the body part should clearly go away, thanks. I am not sure though how to include extracted css when the user calls Vue.use(Grid) (or how is it done with extracted css?).

Do you have any thought on how it can be done?

cristijora commented 7 years ago

It can't be included in Vue.use(Grid) The installation would rather be

import 'vue-js-grid/dist/grid.css'
import Grid from 'vue-js-grid'
Vue.use(Grid)
euvl commented 7 years ago

Hm, you see, the css in the plugin is crucial for plugin to work. It contains bare minimum and hopefully never will be changed beyond the changes allowed by plugin's props.

I feel like plonking it into separate file does not bring any positive effects and only might add more confusion (user's might expect the css file to be a feature rather than a requirement).

euvl commented 7 years ago

It actually was a good call to remove body class, i've found a bug in position calculation function 😄 👍

cristijora commented 7 years ago

Understood your point here. Closing the issue as this is not in scope. Thanks for removing the body class