Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jss-global

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jss-global

Global styles for JSS

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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](https://badges.gitter.im/Join Chat.svg)

Top level global declarations block

const sheet = jss.createStyleSheet({
  '@global': {
    body: {
      color: 'green'
    },
    a: {
      textDecoration: 'underline'
    }
  }
})

Top level global prefix

const sheet = jss.createStyleSheet({
  '@global body': {
    color: 'green'
  }
})

Nested global declarations block

const sheet = jss.createStyleSheet({
  button: {
    float: 'left',
    '@global': {
      span: {color: 'red'}
    }
  }
})

Nested global prefix

const sheet = jss.createStyleSheet({
  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

Keywords

FAQs

Package last updated on 23 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc