Skip to content

Repository files navigation

css-whitespace

Whitespace significant CSS to regular CSS. Typically used for Rework, however you may use it on its own if you like.

Installation

$ npm install css-whitespace
$ component install visionmedia/css-whitespace

API

varcompile=require('css-whitespace');varcss=compile('body\n color: #888\n');

Example

@charset"utf-8"@import"foo.css"
body
padding: 50px
background: black
color: white
form
button
border-radius: 5px
padding: 5px 10px
@media print
body
padding: 0
button
border-radius: 0
width: 100%

yields:

@charset"utf-8";
@import"foo.css";
body {
padding:50px;
background: black;
color: white;
}
formbutton {
border-radius:5px;
padding:5px10px;
}
@media print {
body {
padding:0;
}
button {
border-radius:0;
width:100%;
}
}

License

MIT

About

Convert whitespace significant CSS to valid CSS

Resources

Stars

63 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages