Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
jss-default-unit
Advanced tools
JSS plugin that adds default custom unit to numeric values where needed
Weekly downloads
Readme
Provide plain numeric values in your JSS style definitions, and the plugin will insert the apposite units. Defaults to px
for sizes, ms
for durations, and %
for transform origins, and these can be customized easily (see Usage Example).
Make sure you read how to use plugins in general.
import jss from 'jss'
import defaultUnit from 'jss-default-unit'
// Optionally you can customize default units.
const options = {
'line-height': 'rem',
'font-size': 'rem'
}
jss.use(defaultUnit(options))
const styles = {
container: {
'line-height': 3,
'font-size': 1.7,
'height': 200,
'z-index': 1
}
}
Compiles to:
.container-sdf345 {
line-height: 3rem;
font-size: 1.7rem;
height: 200px;
z-index: 1;
}
File a bug against cssinjs/jss prefixed with [jss-default-unit].
npm i
npm run test
MIT
FAQs
JSS plugin that adds default custom unit to numeric values where needed
The npm package jss-default-unit receives a total of 99,171 weekly downloads. As such, jss-default-unit popularity was classified as popular.
We found that jss-default-unit 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
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.