You are here: Re: cleaning up classes and ids in large site « All PHP « IT news, forums, messages
Re: cleaning up classes and ids in large site

Posted by shimmyshack on 02/16/07 10:32

On 16 Feb, 07:47, dorayme <doraymeRidT...@optusnet.com.au> wrote:
> In article
> <1171600584.942773.271...@q2g2000cwa.googlegroups.com>,
>
> "shimmyshack" <matt.fa...@gmail.com> wrote:
> > On 16 Feb, 03:12, mbstevens <NOXwebmast...@xmbstevensx.com> wrote:
> > > On Thu, 15 Feb 2007 19:02:00 -0800, windandwaves wrote:
> > > > a. find all the IDs and classes used on the site.
> > > > b. check if these classes and IDs are listed in the css
> > > > c. find any classes and IDs listed in the css that are no longer used
> > > > on the site
>
> > > I know of nothing ready-made, but it should be reasonably easy to
> > > program in either Perl or Python.
>
> > if i were you I would write a small reg exp that goes and grabs
> > classes from the css files, put them inside a javascript object/array
> > and download the behaviour.js library and include the object and class
> > in a script on each page.
>
> Would you now! I gave a perfectly simple way to do the job and
> yet you still would do this.
>
> --
> dorayme

sorry to cause you so much offence dorayne, but I felt your idea
didn't catch dynamic building of css using client side code, or css
coming from a database query - in fact any complex web application
which is not completely abstracted, and only covers plain text files
in a ready built state. Even php files might have some css styles as
echo 'border:1px #'.(($i%2==0)?'ccc':'ebebeb').' solid;';
Using users as your engine gives you a distributed solution, which you
can also use to check links, validate code, and many other things.
It is more reliable because it checks the final application when it is
running in all different user agents, and therefore gets the true
picture, it is a bit different to real life where you make the cake
with eggs, here we make the mixing bowl and throw it, a hen and some
grain at the client. If they have a compliant user-agent their cake
will taste nicer.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация