Re:Mincss "clears the junk out of your CSS"
by daGrevis on Tuesday January 22, 2013 @02:55AM
(#5096083)
I see it as:
[] You feed in all URLs at once;
`urls = ["/", "/sign_up/", "/about/",]`
[] It pre-proccesses also JS files and tries to match CSS selectors as well. That would work for jQuery and Zepto!
`$("#foo").html($("<span>").addClass("bar"))`
Edit: Okay, that won't work for `addClass`! :)
Re:Mincss "clears the junk out of your CSS"
by lukedjn on Tuesday January 22, 2013 @03:29AM
(#5096169)
When dealing with a dynamic site or complete web application I think this would work best when tied into Selenium tests (or a similar integrated test framework).
How about running it as a background to the website, over say, a month, at the end of which you'd have pretty good confidence that you'd have hit all paths.
Re:Mincss "clears the junk out of your CSS"
by EnderMB on Tuesday January 22, 2013 @04:59AM
(#5096378)
This is an idea I am currently working on, similar to SitePoint's old "Dust Me Selectors" plugin for Firefox, but running in the background for all selected sites until a set amount of time or the user is happy that they have exhausted all dynamic functionality on the site.
Re:Mincss "clears the junk out of your CSS"
by ganarajpr on Tuesday January 22, 2013 @05:43AM
(#5096486)
How about running it as a plugin or something for a suite of functional specs for the website ( if it has one! ). Functional spec's by definition should run all the paths that a user can take, so it should give a pretty good idea of the css that is used.
Re:Mincss "clears the junk out of your CSS"
by laurencei on Tuesday January 22, 2013 @05:27AM
(#5096445)
oh cool - i'm very interested in this. Can you please email me? My email is in my profile.
Re:Mincss "clears the junk out of your CSS"
by peterbe on Tuesday January 22, 2013 @09:49AM
(#5097321)
Yeah, you could have a proxy that saves the whole HTML with its URL for every hit.
Then run an analysis after a couple of days and you should get a pretty good idea.
Re:Mincss "clears the junk out of your CSS"
by bowmessage on Tuesday January 22, 2013 @02:00AM
(#5095950)
What about a program into which you could feed your pre-processed dynamic documents (php, asp, etc) along with the CSS? I could see myself using that.
Re:Mincss "clears the junk out of your CSS"
by laurencei on Tuesday January 22, 2013 @02:03AM
(#5095961)
The problem is there are often too many variables, i.e. what if a username is "blue" for a boy, "red" for a girl (or something like that).
And PHP etc is too dynamic.
Personally I think the 'best' option is a program which 'records' you using the site, and as a Dev I could use my site for like 30mins, touching each point of key functionality. Then at the end, review what sections of CSS were never used, and pick and choose what to discard based upon that (i.e. I can manually then check for fringe cases I might know of).
i.e. what about ajax calls that result in a new div showing?
or a responsive CSS file with media queries depending upon the size of the screen?