Last modified: 2012-02-22 12:35:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35752, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33752 - [Regression] Wikitable uses CSS not supported in IE6
[Regression] Wikitable uses CSS not supported in IE6
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.20.x
All All
: Normal major (vote)
: 1.19.0 release
Assigned To: Krinkle
: patch, patch-need-review
Depends on:
Blocks: css
  Show dependency treegraph
 
Reported: 2012-01-16 11:40 UTC by Erwin Dokter
Modified: 2012-02-22 12:35 UTC (History)
4 users (show)

See Also:
Web browser: Internet Explorer
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch for common/shared.css (654 bytes, patch)
2012-01-16 11:40 UTC, Erwin Dokter
Details

Description Erwin Dokter 2012-01-16 11:40:47 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.
Comment 1 Krinkle 2012-01-16 16:13:52 UTC
See also r107669
Comment 2 Krinkle 2012-01-16 16:18:00 UTC
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.
Comment 3 Antoine "hashar" Musso (WMF) 2012-01-19 17:26:15 UTC
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 »
Comment 4 Krinkle 2012-01-24 03:23:25 UTC
Marking WONTFIX per r107669. IE6 will fall back to default table styling. Support is not worth the extra maintenance burdon.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links