rstacruz / css-condense

[unsupported] A CSS compressor that shows no mercy
205 stars 4 forks source link

fail to minifize twitter boostrap css #5

Closed gbouthenot closed 10 years ago

gbouthenot commented 11 years ago

css-condese fails to minify twitter boostrap.css. This seems triggered by the use of the "@page { margin: 0.5cm; }"

bootstrap_snip.css:

@media print {
  tr,
  img {
    page-break-inside: avoid;
  }
  @page  {
    margin: 0.5cm;
  }
  h3 {
    orphans: 3;
    widows: 3;
  }
}

cssc bootstrap_snip.css:

~/node_modules/css-condense/node_modules/css-stringify/lib/compress.js:135
    + this.indent(1)
           ^
TypeError: Object #<Compiler> has no method 'indent'
    at Compiler.page (~/node_modules/css-condense/node_modules/css-stringify/lib/compress.js:135:12)
    at Compiler.visit (~/node_modules/css-condense/node_modules/css-stringify/lib/compress.js:31:25)
    at Array.map (native)
    at Compiler.media (~/node_modules/css-condense/node_modules/css-stringify/lib/compress.js:58:18)
    at Compiler.visit (~/node_modules/css-condense/node_modules/css-stringify/lib/compress.js:31:25)
    at Array.map (native)
    at Compiler.compile (~/node_modules/css-condense/node_modules/css-stringify/lib/compress.js:22:12)
    at Object.module.exports [as stringify] (~/node_modules/css-condense/node_modules/css-stringify/index.js:25:19)
    at compressCode (~/node_modules/css-condense/index.js:55:20)
    at compress (~/node_modules/css-condense/index.js:27:10)