CSS Code Formatter Engine that implements the Kary Coding Standards by rewriting the code based on it's parsed AST
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
designs name change... Sep 1, 2016
src New version just for CSS Sep 15, 2018
test updated packages Sep 17, 2018
typings name change... Sep 1, 2016
.gitignore no more important... Aug 30, 2016
.npmignore new version Sep 1, 2016
README.md min changes Sep 17, 2018
package-lock.json updated packages Sep 17, 2018
package.json updated packages Sep 17, 2018


Righteous Title Logo

Righteous is a modern CSS 3 formatter that implements the Kary Coding Standard for CSS. It is a rewriting parsing parser; It reads your CSS code into an AST (abstract syntax tree) and the rewrites that AST into code. This technique allows Righteous to fully format the code based on the specification. This package is the core righteous formatter to be used within other software such as Righteous for Visual Studio Code and similar software.

How Does It Look?



$ npm install righteous-core --save

And then ready to use:

const righteous =
    require( 'righteous-core' )
const code =
    "h1 { color: red }"

try {
    const formattedCode = righteous( code )
} catch ( e ) {
    console.error( "Righteous could not format the code because of" , e )

The .d.ts declaration file is included within the project. Your compiler must auto detect it but if it can't then use: