1. jss-global
Global styles for JSS
jss-global
Package: jss-global
Created by: cssinjs
Last modified: Sun, 19 Jun 2022 06:56:42 GMT
Version: 3.0.0
License: MIT
Downloads: 517,317
Repository: https://github.com/cssinjs/jss-global

Install

npm install jss-global
yarn add jss-global

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code