Style cleanup on AJAX search suggestion dropdown list.
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 30 Apr 2008 07:00:02 +0000 (07:00 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 30 Apr 2008 07:00:02 +0000 (07:00 +0000)
commit9885ec91c3887017beeb0d6694306b0692981025
tree8ff5eace58cb9e2ac354227511a5b8bf46e12d87
parenta84e13e695fa491bd1590115119a0b72cffa5fbc
Style cleanup on AJAX search suggestion dropdown list.

White borders around the highlighted row are removed by collapsing cell spacing and moving the padding inside.

Now using CSS system colors where supported for background, foreground, and highlight colors instead of hardcoded values. These will fit in better with the native controls, especially when high-contrast themes are in use (say, black background, yellow text, and green highlight... :)

Some caveats...

IE 6 and Firefox 2 on Windows look great.

However, a couple caveats on Mac OS X:

* Firefox 3 looks perfect!

* Firefox 2 and other older Gecko browsers, Opera 9.2, and Safari 3.1 provide the *text selection* colors for Highlight and HighlightText, which differ from the *list selection* colors on Mac OS X 10.2 (?) and later. This is technically wrong for what we want, but will at least match the general color selection.

Note that -moz-mac-alternateprimaryhighlight provides the correct background color on Firefox 2/Mac, but IE 6 and Firefox 2 on other platforms don't properly handle a fallback if it's specified straight in the CSS. We could switch it in with JS, but there's not much reason to I think. It still looks and feels fairly native.

* Safari 3.0 and earlier appear to wildly fail with the system colors, though I can't easily test them. There was an ugly WebKit bug where most of the system colors were implemented wrong; Highlight and HighlightText *both show up solid white*, making your text nicely illegible. Since they're implemented (even though wrongly) you can't even set default colors and let them fall through.

See https://bugs.webkit.org/show_bug.cgi?id=6129

I've worked around this by checking the reported WebKit version in the JS and using an alternate class with the hardcoded colors for anything older than what I see in Safari 3.1 (WebKit 525).

Haven't tested anything on Linux; it wouldn't hurt to do a quick sanity check on Konqueror.
includes/DefaultSettings.php
skins/common/mwsuggest.js
skins/common/shared.css