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