Registry / testing / css-to-radium

css-to-radium

JSON →
library1.0.4jsnpmunverified

A CLI utility that converts CSS files into JavaScript objects compatible with Radium, a React styling library. Current stable version 1.0.4, with no recent updates or release cadence. It reads CSS via stdin or --input flag and outputs a CommonJS module exporting Radium-style style objects. Key differentiators: simple one-way conversion, supports multiple input files, and configurable quoting and indentation. Suitable for migrating from plain CSS to Radium's inline style approach.

npm install css-to-radium
INSTALL
IMPORT
SIG · CSS-TO-RADIUM
C
css-to-radium
testingjavascriptv1.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Radium styles (via CLI)
npm install -g css-to-radium css-to-radium < input.css > output.js
The package is a CLI tool, not a library. Output is a CommonJS module, importable via require('./style.js').

Install css-to-radium globally or locally, create a sample CSS file, convert it to a Radium JS object, and verify the output.

npm install css-to-radium echo '.btn { background: #ccc; padding: 10px; font-size: 16px; }' > style.css css-to-radium < style.css > style.js node -e "console.log(require('./style.js'))"
Debug
Known issues
deprecatedPackage unmaintained since 2017; Radium is largely superseded by CSS-in-JS solutions like styled-components or Emotion.
fix
Consider migrating to a modern CSS-in-JS library for better performance and maintenance.
affects: all
gotchaDefault output uses CommonJS module.exports; not directly usable with ES module imports without transpilation.
fix
Use dynamic import() or configure bundler to handle CommonJS output.
affects: all
gotchaNumeric values without units (e.g., padding: 10px becomes padding: 10) are assumed pixels; may break CSS expectations.
fix
Manually review and add units where needed, or expect pixel-only defaults.
affects: all
Errors
Common errors & fixes
bash: css-to-radium: command not found
Package not installed or global bin missing from PATH.
fix
npm install -g css-to-radium or use npx css-to-radium
TypeError: Cannot read property 'css' of undefined
Passing an empty file or missing input via stdin.
fix
Ensure stdin is redirected: css-to-radium < file.css
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
css-to-radium — npm install css-to-radium · libregistry