Forums

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

Home Forums Other UnCSS – a tool to remove unused selectors

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #183178
    shaneisme
    Participant

    I searched and couldn’t find anything, so I decided to put this up in case anyone that might use it doesn’t know about it:

    https://github.com/giakki/uncss

    If you’re using a CSS library like Bootstrap, Foundation or one you made yourself, this can give you extraordinary savings on CSS file size.

    I was actually rolling my own base library, this was only 44kb min unzipped, but I was doing this in conjunction with the site CSS so I would of course get a second render block. Regardless of how small the files were, I now have a single CSS file that uses only the selectors I need and none I don’t.

    2 files to download, one at 44kb another at 11kb -> 1 file to download at 19kb. Other sites I’ve seen out there can have even more dramatic improvements.

    Not bad :)

    #183182
    Alen
    Participant
    #183186
    shaneisme
    Participant

    Very nice! Tons of stuff (including UnCSS) in that talk…

    #183210
    nixnerd
    Participant

    Hey doesn’t Grunt have a feature for this?

    #183214
    shaneisme
    Participant

    Yeah, it’s linked from the github.

    #183215
    nixnerd
    Participant

    Ahhh… I think this is the one I was talking about. I want to use it on a project but… I’m having some Grunt issues. This is specifically the tool I want Grunt for though.

    #183220
    chrisburton
    Participant

    Out of curiosity, is there a similar tool for jQuery?

    #183221
    nixnerd
    Participant

    Probably. I get lost with all the tools on Github.

    #183259
    Alen
    Participant

    is there a similar tool for jQuery

    What do you mean?

    You can custom build jQuery and only require things you need or using.

    #183264
    nixnerd
    Participant

    I think he means to clean up unused functions, objects or whatever. But @chrisburton, I must say that for me at least, my JS files are MUCH smaller than my CSS files. I don’t often have functions that are doing jack shit and I’m sure you don’t either. These files should be easier to review and edit yourself.

    Now… if someone knows of a tool to detect infinite loops, I’m interested! Oh wait… isn’t that the halting problem? Nevermind.

    #183266
    chrisburton
    Participant

    These files should be easier to review and edit yourself.

    Truth.

    #183267
    nixnerd
    Participant

    Truth.

    Even still… I bet someone has created a tool for it and put it on Github.

    #183270
    chrisburton
    Participant

    Even still… I bet someone has created a tool for it and put it on Github.

    I just need to take time to create a custom jQuery library that fits what I need. If there’s a possible tool for that, great. I’ll have to find it. Anyway, sorry to hijack the thread.

    Update: http://projects.jga.me/jquery-builder

    #183953
    chrisburton
    Participant

    @upendra-gupta Done spamming yet?


    @TheDoc
    , @Paulie_D, @Senff

    #184111
    Paulie_D
    Member

    Got it….

    I’ve been out of the country and sans interweb access for most of the time.

    Nearly 100 posts spammed and deleted.

    What a welcome back


    @RobSkiWarrior
    If you can ban/block/hitwithhammer this guy.

    https://css-tricks.com/forums/users/upendra-gupta/

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