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

Robin Stocker robin at nibor.org
Sat Sep 1 22:41:39 CEST 2007


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?)

What do you think, could you commit the patch?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: headerlink-style-speed.patch
Url: http://mail.python.org/pipermail/doc-sig/attachments/20070901/58d312b6/attachment.txt 

More information about the Doc-SIG mailing list