Giter VIP home page Giter VIP logo

Comments (14)

GoalSmashers avatar GoalSmashers commented on May 11, 2024

I think we eventually should have it. Thanks for suggesting.

from clean-css.

nstepien avatar nstepien commented on May 11, 2024

It should also support translation from rgb()/hsl() to hex.
Also shorten #FFFFFF to #FFF for example.

hex.replace(/#([\da-fA-F])\1{5}/, '#$1$1$1');

from clean-css.

GoalSmashers avatar GoalSmashers commented on May 11, 2024

@MayhemYDG - we already do rgb -> hex and color shortening (see specs)! A (lengthy) list of all optimizations is coming soon - see #35.

from clean-css.

nstepien avatar nstepien commented on May 11, 2024

Oh all right then. Still missing hsl translation.

from clean-css.

GoalSmashers avatar GoalSmashers commented on May 11, 2024

We do hsl too - need that optimizations wiki page urgently :-)

from clean-css.

nstepien avatar nstepien commented on May 11, 2024

Uh? I use clean-css via grunt-contrib-cssmin and it's not translating hsl to hex.

from clean-css.

GoalSmashers avatar GoalSmashers commented on May 11, 2024

@MayhemYDG please check if you use grunt-contrib-cssmin 0.4.1+ as they only recently bumped clean-css dependency to 0.10.x (we added hsl support in 0.8.3).

from clean-css.

nstepien avatar nstepien commented on May 11, 2024
% npm install clean-css
% cat main.css | ../../../node_modules/clean-css/bin/cleancss -o test.css

  Usage: cleancss [options] <source-file>
  ...

This doesn't even seem to work?

../../../node_modules/clean-css/bin/cleancss main.css -o test.css

It doesn't translate hsl to hex, looks like the issue does come from clean-css.
I'm on the latest node, grunt and grunt-contrib-cssmin.

from clean-css.

GoalSmashers avatar GoalSmashers commented on May 11, 2024

@MayhemYDG - I was mistaken by another part of our code which handles HSL/HSLA cleanup. There's a ticket for HSL conversions now: #83.

from clean-css.

nstepien avatar nstepien commented on May 11, 2024

Great!

from clean-css.

GoalSmashers avatar GoalSmashers commented on May 11, 2024

@MayhemYDG - HSL conversions ready in 8cf8283.

from clean-css.

nstepien avatar nstepien commented on May 11, 2024

Good job.

from clean-css.

XhmikosR avatar XhmikosR commented on May 11, 2024

Thanks! This was a much awaited feature. :)

from clean-css.

GoalSmashers avatar GoalSmashers commented on May 11, 2024

👍

from clean-css.

Related Issues (20)

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.