
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
Webpack plugin that automatically generates and injects CSS utilities to your application.
Inspired by bootstrap's utility classes, stylos is a Webpack plugin that automatically generates and injects CSS utilities into your application. All you have to do is specify utility classes on DOM elements; webpack will identify and generate the properties with relevant values and inject them to your application.

As you can see, all you have to do is specify the classes having shorthand for the CSS property key, required value and optionally the unit. Stylos will understand it and generate the CSS for you.
webpack-dev-server / webpack serveHere is the the list of known shorthand formulas that you can use in your DOM classes.
| Shorthand | CSS Property | Example Usage |
|---|---|---|
p | padding | p10 will translate to padding: 10px |
pt | padding-top | pt20 will translate to padding-top: 20px; |
pb | padding-bottom | pb10 will translate to padding-bottom: 10px; |
pr | padding-right | pr20 will translate to padding-right: 20px; |
pl | padding-left | pl23 will translate to padding-left: 23px; |
m | margin | m20 will translate to margin: 20px |
mt | margin-top | mt20 will translate to margin-top: 20px; |
mb | margin-bottom | mb20 will translate to margin-bottom: 20px; |
ml | margin-left | ml50 will translate to margin-left: 50px; |
mr | margin-right | mr30 will translate to margin-right: 30px; |
w | width | w200 will translate to width: 200px |
h | height | h60 will translate to height: 60px; |
br | border-radius | br5 will translate to border-radius: 5px; |
fs | font-size | fs15 will translate to font-size: 15px |
fw | font-weight | fw400 will translate to font-weight: 400px |
lh | line-height | lh20em will translate to line-height: 20em |
t | top | t6 will translate to top: 6px; |
l | left | l30 will translate to left: 30px |
b | bottom | b20em will translate to bottom: 20em; |
r | right | r20em will translate to right: 20em; |
For the units, you can specify them after the value and relevant CSS unit will be used
px, pt, em, p, vh, vw, vmin, ex, cm, in, mm, pc will translate to the same unit in CSSpx will be used% specify it as p e.g. w50p will get translated to width: 50%n e.g. fw600n will translate to font-weight: 600First, install Stylos as a development dependency:
npm i -D stylos
Then, import Stylos into your Webpack configuration and add it to your list of plugins:
// webpack.config.js
const Stylos = require('stylos');
module.exports = {
// ...
rules: [
// ...
// Add the rule to use the loader for HTML or JSX files
{
test: /(\.js|\.jsx|\.html)$/,
exclude: /node_modules/,
use: Stylos.Loader
}
],
plugins: [
// ...
// new HtmlWebpackPlugin(..), // <-- You must have it installed and set up
// Add the plugin right after the HTMLWebpackPlugin
new Stylos.Plugin()
]
}
MIT © Kamran Ahmed
FAQs
Webpack loader and plugin to generate and inject CSS utilities to your apps
The npm package stylos receives a total of 4 weekly downloads. As such, stylos popularity was classified as not popular.
We found that stylos 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.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.