Git Product home page Git Product logo

node-cssmin's People

Contributors

blakmatrix avatar davglass avatar jbleuzen avatar ltressens avatar pdehaan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-cssmin's Issues

Space incorrectly removed when using svg gaussian blur filter

This expression (css blur for Firefox) :

.blur
{
  filter: url('data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter id="gaussian_blur"><feGaussianBlur in="SourceGraphic" stdDeviation="4" /></filter></defs></svg>#gaussian_blur');
}

Is minified like this :

.blur{filter:url("data:image/svg+xml;utf8,<svgversion=\"1.1\"xmlns=\"http://www.w3.org/2000/svg\"xmlns:xlink=\"http://www.w3.org/1999/xlink\"><defs><filterid=\"gaussian_blur\"><feGaussianBlurin=\"SourceGraphic\"stdDeviation=\"4\"/></filter></defs></svg>#gaussian_blur")}

Spaces are removed where they should not : "svg version", "filter id", etc...

Bug: Ignore DXImageTransform

cssmin ignore DXImageTransform !

Input

p{
  opacity: 0;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
  filter: alpha(opacity=0);
}

Output

p{opacity:0;-ms-filter:alpha(opacity=0);filter:alpha(opacity=0)}

CLI usage: docs?

Can this be added, please?

Looked through the source - can this be documented in the README, please?

Export cssmin directly

Just a suggestion, but why not do:

exports = cssmin;

That way, you could use it just like:

var cssmin = require('cssmin');

Makes it just a little nicer, and I can't imagine you'd need to export other things in the future.

Supressing log

Hello,

cssmin is logging output to stderr or exiting with non-zero exit code, which is causing an error to be logged in our Maven build process, even though it completes fine, e.g.:

[INFO] $ run-p build:js build:css -s
[INFO] $ node-sass app/index.scss dist/foo.css --quiet
[INFO] $ postcss dist/foo.css -o dist/foo.css --use autoprefixer -b 'last 2 versions'
[ERROR] โœ” Finished dist/foo.css (361 ms)
[INFO] Done in 10.47s.

I've tried to look for a CLI option to silence logging but couldn't find any. Is there any way to supress these success log messages?

Incorrectly squashes whitespace in generated content

pre:before {
  content: "          surrounded by ten spaces          ";
}

gets clobbered to

pre:before {
  content: " surrounded by ten spaces ";
}

which, needless to say, doesn't produce the same end effect. You probably have to apply at least some css grammar parsing for cssmin to be safe. (As a bonus side effect, that would also allow some further optimization like removing the space between a selector and its {}, though.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.