[Doc-SIG] [PATCH] New documentation: headerlink style speed issue

Georg Brandl g.brandl at gmx.net
Sat Sep 1 23:49:37 CEST 2007


Robin Stocker schrieb:
> Hi,
> 
> Browsing the (very pretty) new documentation with Firefox, I noticed
> that selecting text was slow, especially on large pages. For example, on
> the module index page, it could take up to 1 second until the blue
> selection background would appear after I had selected some text with
> the mouse.
> 
> I figured it could have something to do with the style sheet and by
> commenting out various parts of default.css, I narrowed the cause down
> to this:
> 
> *:hover > a.headerlink,
> *:hover > a.headerlink,
> *:hover > a.headerlink,
> *:hover > a.headerlink,
> *:hover > a.headerlink,
> *:hover > a.headerlink {
>     visibility: visible;
> }
> 
> Most likely the problem is with the *:hover quantifier. When the mouse
> hovers over any element, Firefox has to check if there's a a.headerlink
> in the element. After changing *:hover to the specific elements h1-h6
> and dt (are these all?), text selection is as smooth as it should be and
> maybe even overall display speed is better.
> 
> Attached is a patch for this, which also removes some (unnecessary?)
> duplication.
> 
> What do you think, could you commit the patch?

Yes, thank you very much! It's committed as rev. 57898 and will go live
on docs.python.org within 12 hours' time.

Cheers,
Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Doc-SIG mailing list