Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
jss-plugin-nested
Advanced tools
The jss-plugin-nested package is a plugin for JSS (JavaScript Style Sheets) that allows you to use nested rules in your styles, similar to how you would in Sass or Less. This makes it easier to manage and organize your CSS, especially for complex components.
Nested Selectors
This feature allows you to nest selectors within a style rule. In this example, the hover state of the button is nested inside the button's main style rule.
{
"button": {
"color": "blue",
"&:hover": {
"color": "red"
}
}
}
Nested Media Queries
This feature allows you to nest media queries within a style rule. In this example, the container's width changes based on the screen size.
{
"container": {
"width": "100%",
"@media (min-width: 600px)": {
"width": "50%"
}
}
}
Nested Pseudo-Classes
This feature allows you to nest pseudo-classes within a style rule. In this example, the input's border color changes when it is focused.
{
"input": {
"border": "1px solid black",
"&:focus": {
"border-color": "blue"
}
}
}
Styled-components is a library for React and React Native that allows you to use component-level styles in your application. It supports nesting of selectors and media queries, similar to jss-plugin-nested, but it also provides additional features like theming and dynamic styling.
Emotion is a performant and flexible CSS-in-JS library. It allows you to style applications quickly with string or object styles. Like jss-plugin-nested, it supports nested selectors and media queries, but it also offers powerful features like theming and server-side rendering.
Aphrodite is a CSS-in-JS library that allows you to write styles in JavaScript. It supports nested selectors and media queries, similar to jss-plugin-nested. However, it focuses more on performance and critical CSS extraction.
JSS plugin that enables support for nested selectors
See our website jss-plugin-nested for more information.
Using npm:
npm install jss-plugin-nested
or using yarn:
yarn add jss-plugin-nested
10.1.0 (2020-3-15)
getDynamicStyles
utility function was originally exposed from jss
package, but I don't think it was used externally, so I moved it to react-jss
package and made it internal. If you have been using it as public API let me know, we will have to revert the change.FAQs
JSS plugin that enables support for nested selectors
The npm package jss-plugin-nested receives a total of 776,192 weekly downloads. As such, jss-plugin-nested popularity was classified as popular.
We found that jss-plugin-nested demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.