
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
<div data-backgroundColor="white">
<h1 data-color="gray.900">attrCSS</h1>
</div>
This command generates an attr.css
file that can be used in your project:
npx attrcss build
Import the generated CSS file in your project, and start using data attributes:
<div data-backgroundColor="white">
<h1 data-color="gray.900">attrCSS</h1>
</div>
# yarn
yarn add -D attrcss
# npm
npm i -D attrcss
Then run it using attrcss build
.
-i
, --input
Specify a custom .json
theme file. Your theme will be merged with the default one.
It must follow this structure:
{
"prefix": "",
"separator": ".",
"theme": {
"something": {
"extend": ["colors", "spacing", "-spacing"],
"alias": ["someone"],
"valueName1": "value",
"valueName2": "value"
}
},
"variants": {}
}
data-
gray.900
"-spacing"
results in negative values.something
. Will be used for creating data properties.responsive
or any other CSS pseudo class.-o
, --output
You can specify a custom output file here. It must be a CSS file.
PS. Use PurgeCSS!
PPS. This is functional, but I never tried it in production. 🦦
PPPS. The code is a bit messy. I was kinda bored ._.
FAQs
TailwindCSS using data attributes
We found that attrcss 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.