doczjs / docz-plugin-css

This package makes it possible to use preprocessors and css modules on docz
https://docz.site
38 stars 32 forks source link

Using Global CSS #13

Closed Quadriphobs1 closed 5 years ago

Quadriphobs1 commented 5 years ago

Is there a way to use a global css scope based, I am having a global css for my project with scss which my project auto detect the compiled css and append it to the head, but I can't seems to get a way to work with this on my project. The problem is that I am not using css modules so its not going to work, is there an option to use this without css module and having a global scope styles, I dig into the styling and I see that the compiled styles if I import import '../styles/scss/styles.scss' in my document.mdx file it usually append on the class names with .docz_...

nurycaroline commented 5 years ago

Hi @Quadriphobs1

In doczrc.js, use cssmodules: false, Solved for me.

import { css } from 'docz-plugin-css'

export default {
  title: 'CSS Sass',
  plugins: [
    css({
      preprocessor: 'sass',
      cssmodules: false,
    }),
  ],
}
Quadriphobs1 commented 5 years ago

👍