{"id":25143,"library":"css-stringify","title":"css-stringify","description":"A JavaScript CSS stringifier for Node.js, part of the Rework CSS ecosystem. It takes an AST produced by css-parse and converts it back to a CSS string. Version 2.0.0 is the latest stable release, compatible with Node.js. Typically used internally via the `css` package. Not actively developed, but stable for legacy projects.","status":"maintenance","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/reworkcss/css-stringify","tags":["javascript","css","stringify","stylesheet"],"install":[{"cmd":"npm install css-stringify","lang":"bash","label":"npm"},{"cmd":"yarn add css-stringify","lang":"bash","label":"yarn"},{"cmd":"pnpm add css-stringify","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Named export, not default. Also exposed via require: const { stringify } = require('css-stringify');","wrong":"import stringify from 'css-stringify';","symbol":"stringify","correct":"import { stringify } from 'css-stringify';"}],"quickstart":{"code":"import { stringify } from 'css-stringify';\nimport { parse } from 'css-parse';\n\nconst css = 'body { color: red; }';\nconst ast = parse(css);\nconst output = stringify(ast);\nconsole.log(output); // prints: body { color: red; }","lang":"typescript","description":"Parses a CSS string to AST using css-parse, then stringifies it back to CSS using css-stringify."},"warnings":[{"fix":"Use the 'css' package which re-exports stringify: import { stringify } from 'css';","message":"Package is deprecated in favor of the combined 'css' package. Direct usage is uncommon.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'2.0.0':34 'activ':51 'ast':19 'back':28 'compat':40 'convert':26 'css':2,6,14,23,31,48,59 'css-pars':22 'css-stringifi':1 'develop':52 'ecosystem':15 'intern':45 'javascript':5,58 'latest':37 'legaci':56 'node.js':9,42 'packag':49 'pars':24 'part':10 'produc':20 'project':57 'releas':39 'rework':13 'stabl':38,54 'string':32 'stringifi':3,7,60 'stylesheet':61 'take':17 'typic':43 'use':44 'version':33 'via':46","created_at":"2026-05-01T13:43:13.834207+00:00","updated_at":"2026-05-01T13:43:13.834207+00:00","problems":[{"fix":"import { stringify } from 'css-stringify';","cause":"Using default import instead of named import.","error":"TypeError: stringify is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/reworkcss/css-stringify","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/css-stringify","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}