contentacms / contenta_vue_nuxt

Start in minutes a Drupal 8 with JSON API and Vue.js : a Nuxt.js ( Vue.js SSR ) consumer for Contenta CMS
https://contentanuxt.now.sh
GNU General Public License v2.0
126 stars 32 forks source link

Install Bulma css as a npm dependency / should we use a css framework ? #9

Closed yann-yinn closed 6 years ago

yann-yinn commented 7 years ago

Bulma was used because there was no design at the beginning of the project, and because it is a "zero JS" CSS framework, which make it very easy to use with Vue.js or React. Today 95% of css is not used because I included all bulma.css file manually. We may decreased if needed css sized using bulma sass version with npm and importing only what we are using.

And now that they are designs styleguides (https://www.drupal.org/node/2900720), should we even use a css framework ?

yann-yinn commented 7 years ago

might be the way to do it :

make sur correct webpack loader are installed

 npm install --save-dev node-sass sass-loader
npm i bulma

then in nuxt.config.js, add a "css" array:

  css: [
   // include bulma module
    'bulma', 
    // SCSS file in the project
    '@/assets/css/app.scss',
    // our built css
    '@/assets/css/app.css',
  ]

We can also use scss in our vue components like this

<style lang="scss">

</style>