Last modified: 2012-02-22 12:35:17 UTC
Created attachment 9859 [details] Patch for common/shared.css Somewhere between 1.18 and 1.19, the CSS for .wikitable was changed from table.wikitable th, table.wikitable td { border: 1px #aaa solid; padding: 0.2em; } table.wikitable th { background-color: #f2f2f2; text-align: center; } table.wikitable caption { font-weight: bold; } To... table.wikitable > tr > th, table.wikitable > tr > td, table.wikitable > * > tr > th, table.wikitable > * > tr > td { border: 1px #aaa solid; padding: 0.2em; } table.wikitable > tr > th, table.wikitable > * > tr > th { background-color: #f2f2f2; text-align: center; } table.wikitable > caption { font-weight: bold; } I don't know the reasoning behind this, but I do know it will break in IE6 (and possibly other legacy browsers that do not support the ">" selector). I don't really care about dropping support for IE6, but to break such a trivial element as .wikitable is rather weird, especially when not needed. Marking 'critical', but I leave it up to the devs to decide.
See also r107669
The reasoning was that with the current rules as in 1.18 have the problematic behavior of matching child tables: {| class="wikitable" ! foo ! bar |- | baz | quux {| class="something-else" ! lorem |- | ipsum |} |} if "table.something-else" is given a nice styling, it will be screwed up with inherited styles because "table.wikitable th" also matches '<table class="wikitable> - <tr> - <td> - <table class="something-else"> <tr> <th>' instead of just '<table class="wikitable"> - <tr> - <th>' which is why many table styles all over MediaWiki related code is constantly fighting possible inherited styles, which makes cascading even harder.
I have added a design file docs/uidesign/child-selector-emu.html ( r109553 ). It applies a style and then reset the nested elements using a star selector instead of child selector. That might fix the issue. Might want to look at http://craftycodeblog.com/2010/05/19/emulating-css-child-selectors-in-ie6/ which purpose several methods. Specially have a look at the last one : « CSS Descendant Selector »
Marking WONTFIX per r107669. IE6 will fall back to default table styling. Support is not worth the extra maintenance burdon.