Giter Club home page Giter Club logo

Comments (11)

Swaagie avatar Swaagie commented on August 20, 2024

Hmm yeah this is a tricky one, strictly speaking this would be outside the scope of the project. Strictly in the sense that CSS is not HTML. Currently, all values of attributes are left intact. But I do feel like that removing additional white spaces (keep one white space basically) and newlines from attributes wouldn't hurt. So I guess I can do something there, I'll release that as part of 1.0.0

from minimize.

stevemao avatar stevemao commented on August 20, 2024

Sounds good. Yeah keeping one white space should work for attribute values in general

class="
    big
    title
"

can become

class="big title"

In order to further optimise inline css I should use another tool.

from minimize.

mlenser avatar mlenser commented on August 20, 2024

This is actually the reason I am going to switch away from this minifier. Any hope of optionally allowing line breaks in attributes? For instance the value of an input.

from minimize.

Swaagie avatar Swaagie commented on August 20, 2024

As far as I'm aware this was fixed, if you have a example where it does not work please let me know. I'll make sure to fix that as well

from minimize.

mlenser avatar mlenser commented on August 20, 2024

The behavior before this bug was fixed is what I desire.

Likely the way to allow for this is to implement ignoring areas between a specified comment.

from minimize.

Swaagie avatar Swaagie commented on August 20, 2024

Nvm my stupid previous comment, fixed and released with 1.5.0, simply pass whitespace: true to retain all whitespace/newlines in attributes

from minimize.

mlenser avatar mlenser commented on August 20, 2024

Whitespace in attributes, nice!

Forgive my ignorance of the release schedule, but when you say "fixed and released", does that mean it will release in the future at some point? As I don't see any commits.

from minimize.

mlenser avatar mlenser commented on August 20, 2024

Any eta on 1.5?

from minimize.

Swaagie avatar Swaagie commented on August 20, 2024

1.5 should be out, not sure about the integration with the gulp plugin, but that is outside my control.

npm info minimize output

     '1.3.3': '2015-04-03T07:17:53.369Z',
     '1.4.0': '2015-04-25T23:30:40.919Z',
     '1.4.1': '2015-04-29T07:26:47.843Z',
     '1.5.0': '2015-07-01T07:37:17.260Z' },

from minimize.

mlenser avatar mlenser commented on August 20, 2024

I don't see any commits on this GitHub or any releases, which is why I'm asking.

https://github.com/Swaagie/minimize/commits/master
https://github.com/Swaagie/minimize/releases

Gulp is indeed something else and I plan to ask them as soon as I confirm that 1.5 is released. But if you say it is I'll open an issue there for them to use your latest.

from minimize.

Swaagie avatar Swaagie commented on August 20, 2024

O haha, my bad, I totally forgot to push and tag :( thanks for notifying.

edit: will do now!

from minimize.

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.