r107673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107672‎ | r107673 | r107674 >
Date:00:00, 31 December 2011
Author:danny_b
Status:ok (Comments)
Tags:
Comment:
+ complementary <tbody> involved rules in wikitable definitions for browsers which add <tbody> not only virtually (follow-up to r107669)
Modified paths:
  • /trunk/phase3/skins/common/commonPrint.css (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/commonPrint.css
@@ -326,11 +326,13 @@
327327 border-collapse: collapse;
328328 }
329329 table.wikitable > tr > th, table.wikitable > tr > td,
 330+table.wikitable > tbody > tr > th, table.wikitable > tbody > tr > td,
330331 .mw_metadata th, .mw_metadata td {
331332 border: 1px #aaa solid;
332333 padding: 0.2em;
333334 }
334335 table.wikitable > tr > th,
 336+table.wikitable > tbody > tr > th,
335337 .mw_metadata th {
336338 text-align: center;
337339 background: white;
Index: trunk/phase3/skins/common/shared.css
@@ -476,11 +476,14 @@
477477 color: black;
478478 }
479479 table.wikitable > tr > th,
480 -table.wikitable > tr > td {
 480+table.wikitable > tr > td,
 481+table.wikitable > tbody > tr > th,
 482+table.wikitable > tbody > tr > td {
481483 border: 1px #aaa solid;
482484 padding: 0.2em;
483485 }
484 -table.wikitable > tr > th {
 486+table.wikitable > tr > th,
 487+table.wikitable > tbody > tr > th {
485488 background-color: #f2f2f2;
486489 text-align: center;
487490 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r107834* follow up to r107673 - adding universal selector, because <thead> and <tfoo...danny_b14:58, 2 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107669* more specific selectors for wikitable - don't inherit properties to nested ...danny_b23:23, 30 December 2011

Comments

#Comment by Krinkle (talk | contribs)   00:11, 31 December 2011

Thx, now it works in Chrome too.

#Comment by Fomafix (talk | contribs)   12:05, 31 December 2011

thead and tbody is missing for class="wikitable sortable"

#Comment by Fomafix (talk | contribs)   13:00, 31 December 2011

The selector can be shortened by universal selector:

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;
}

Example table:

{| class="wikitable sortable"
|-
! Head
|-
| Body
|-
! Foot
|}
Head
Body
Foot
#Comment by Krinkle (talk | contribs)   00:27, 2 January 2012

Yep, we need to match tfoot and thead as well. Using the * instead of tbody will fix that.

#Comment by Danny B. (talk | contribs)   14:59, 2 January 2012
#Comment by Krinkle (talk | contribs)   16:03, 2 January 2012

Marking this 'ok'. The introduction of the child selector for the wikitable styling in general is not reviewed yet in r107669 though.

Status & tagging log