Reply to Re: css recursion

Your name:

Reply:


Posted by JD on 06/16/07 09:19

Ben C wrote:
<snip good post>
> In fact using a selector rather than inline styles may be a tiny bit
> faster because of the reduced amount of parsing.
>
> A more complex selector like div td div { ... } will be slightly harder
> to match since it's a little bit like an easy version of matching a
> regular expression, but I wouldn't worry about it.

Sort of reminds me of a question I was thinking about recently.

Is 'optimisation' any valid reason to consciously limit the depth of
descendant selectors in CSS? For example, suppose I have a list of links
inside a #navbar div. To style the a elements in the navbar, I could do
this:

#navbar a { ... }

but I prefer to do this:

#navbar ul li a { ... }

just because I find the latter slightly more lucid when reading the
stylesheet.

Is there any circumstance where this coding style could noticeably slow
things down? Or is worrying about this stuff a waste of time because the
speed differences are so negligible?

[Back to original 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

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