Socket
Socket
Sign inDemoInstall

jss-plugin-global

Package Overview
Dependencies
6
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jss-plugin-global

Global styles for JSS


Version published
Weekly downloads
2M
decreased by-0.26%
Maintainers
1
Install size
1.96 MB
Created
Weekly downloads
 

Package description

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

Changelog

Source

10.10.0 (2023-2-9)

Improvements

  • [jss] Added support for @container query 1637

Readme

Source

jss-plugin-global

Version License Downlodas Size Dependencies

Global styles for JSS

See our website jss-plugin-global for more information.

Install

Using npm:

npm install jss-plugin-global

or using yarn:

yarn add jss-plugin-global

Keywords

FAQs

Last updated on 09 Feb 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc