The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS css minification

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #41085

    Hi, I often use styles like the following:

    background-image: -webkit-linear-gradient(bottom, rgb(243,243,243) 36%, rgb(255,255,255) 90%);

    And I notice that most of compressors I have found online, delete some lines of my code,
    (mostly css3 style), which cause malfunctioning of the website. Because of this I decide to write, my own css compressor from scratch, that supports all of this css3 and ie hack styles and I am almost at the finish line.

    My question is how many of you use minifying technics and is a tool like this will be helpful? 10x


    What minifier are you using that would strip stuff out? I’d say you’re using the wrong minifier or there are existing problems with the code.


    Anyway 10x for the suggestions. I launch my compressor and can see it [here]( “here”). I hope to be helpful. I tested with a few sites and worked well.


    Might be worth looking into SASS / Compass for this, as they can compile it into a compressed CSS file. The advantage with working like this is, you’ll have your SCSS files that you work on and your css file get generated automatically. And if you’re using CSS3, the prefixes can be added automatically for you through compass.


    @redhornet: The compressor should be smart enough to also recognize color names. If I plug in this css, it doesn’t compress the definitions:

    #test1 { background: red; }
    #test2 { background: #ff0000; }

    should be:


    It uses `red` since `red` is shorter than `#f00`.


    Thanks Mottie I didn’t thought about this case. I will add this definitely! Cheers!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.