JSS plugin, allows global styles.
Clone or download
Latest commit 62374a9 Sep 30, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src 2.0.0 Jun 20, 2017
.babelrc first draft Nov 19, 2016
.eslintrc first draft Nov 19, 2016
.gitignore first draft Nov 19, 2016
.npmignore first draft Nov 19, 2016
LICENSE first draft Nov 19, 2016
changelog.md changelog v3 Sep 30, 2017
karma.conf.js first draft Nov 19, 2016
package-lock.json 3.0.0 Sep 30, 2017
package.json 3.0.0 Sep 30, 2017
readme.md fix gitter image url Dec 29, 2016
tests.html first draft Nov 19, 2016
tests.webpack.js first draft Nov 19, 2016
webpack.config.js first draft Nov 19, 2016

readme.md

Global Styles for JSS

If you want to write regular globally scoped CSS with JSS, this plugin is for you. Don't use it if you can avoid it.

Gitter

Top level global declarations block

const styles = {
  '@global': {
    body: {
      color: 'green'
    },
    a: {
      textDecoration: 'underline'
    }
  }
}

Top level global prefix

const styles = {
  '@global body': {
    color: 'green'
  }
}

Nested global declarations block

const styles = {
  button: {
    float: 'left',
    '@global': {
      span: {color: 'red'}
    }
  }
}

Nested global prefix

const styles = {
  button: {
    float: 'left',
    '@global span': {color: 'red'}
  }
}

Issues

File a bug against cssinjs/jss prefixed with [jss-global].

Run tests

npm i
npm run test

License

MIT