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

jss-plugin-global

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jss-plugin-global

Global styles for JSS

  • 10.10.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5M
decreased by-14%
Maintainers
1
Weekly downloads
 
Created

What is jss-plugin-global?

The jss-plugin-global npm package is a plugin for JSS (JavaScript Style Sheets) that allows you to define global CSS rules within your JSS styles. It enables you to write global selectors (like body, html, or any other global HTML element) inside a JSS object, which will then be applied to the whole document.

What are jss-plugin-global's main functionalities?

Defining global styles

This feature allows you to set global CSS properties for HTML elements. The code sample demonstrates how to set the font-size for the html element and reset the margin and padding for the body element.

{"@global": {"html": {"font-size": "16px"}, "body": {"margin": 0, "padding": 0}}}

Using global selectors

With this feature, you can define styles for global classes. The code sample shows how to change the text color to blue for elements with the class 'my-global-class'.

{"@global": {".my-global-class": {"color": "blue"}}}

Nesting global selectors

This feature allows for nesting within global selectors. The code sample demonstrates how to set a yellow background color for elements with the class 'my-class' that are children of the element with the id 'my-id'.

{"@global": {"#my-id": {"& .my-class": {"background-color": "yellow"}}}}

Other packages similar to jss-plugin-global

Keywords

FAQs

Package last updated on 09 Feb 2023

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