jss-global

3.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    123,156
    • latest

Version History

Package Sidebar

Install

npm i jss-global

Weekly Downloads

125,516

Version

3.0.0

License

MIT

Last publish

Collaborators

  • kof