tabler / tabler-vue

Vue.js components and demo for the Tabler UI theme.
https://tabler.github.io/tabler-vue/
MIT License
194 stars 50 forks source link

How should we handle CSS styling #5

Open Nilpo opened 6 years ago

Nilpo commented 6 years ago

How would you like to handle styling? The "Vue way" to do this is to take all of the styles necessary for a particular component and place it in with that component. Alternatively, we could keep all styles in a central stylesheet or some mix of both.

I would suggest that resets and page-wide styles are in a central stylesheet and component-specific styles remain with those components.

chrisbbreuer commented 6 years ago

What's the point of that? Why would you not just piggyback off of tabler's stylesheets?

Nilpo commented 6 years ago

It would be using tabler's stylesheet, but it would be sectioned and included with each component. The Vue best practice is to use modular, scoped styles with each component. It would require more work to maintain though which is why I'm asking for opinions.

chrisbbreuer commented 6 years ago

I get where you are coming from, but I think it's pretty easy to add and remove component .scss files from dashboard.scss. It will make things much easier to maintain and structure - in my opinion.

isneezy commented 6 years ago

If we have scoped style the end user will have the advantage of just importing the styles that a necessary and not whole tabler dashboard, and this will help them minimise the size of the final bundle. But in another hand we may have maintenance nightmare! I think for now we can keep the dashboard.scss

Nilpo commented 6 years ago

Ok, let's keep the single file for the first full release. We can revisit this idea later if we want to.