r91340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91339‎ | r91340 | r91341 >
Date:01:57, 2 July 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
* Put float:left/right for images in shared.css with @noflip. This was inconsistent between skins, causing image alignment on RTL wikis to be dependent on your skin. Left is left and right is right, even for RTL languages :)
* Also moving position: relative; from all skins to shared.css
* Replacing .mw-content-ltr/rtl (added in r90743) with div#content [dir="ltr/rtl"] so it also works on e.g. special pages
Modified paths:
  • /trunk/phase3/skins/chick/main.css (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)
  • /trunk/phase3/skins/modern/main.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)
  • /trunk/phase3/skins/simple/main.css (modified) (history)
  • /trunk/phase3/skins/vector/screen.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/chick/main.css
@@ -253,20 +253,14 @@
254254 }
255255
256256 /* images */
257 -div.floatright, table.floatright {
258 - clear: right;
259 - float: right;
 257+/* @noflip */div.floatright, table.floatright {
260258 margin: 0;
261 - position: relative;
262259 border: 0.5em solid white;
263260 border-width: 0.5em 0 0.8em 1.4em;
264261 }
265262 div.floatright p { font-style: italic; }
266 -div.floatleft, table.floatleft {
267 - float: left;
268 - clear: left;
 263+/* @noflip */div.floatleft, table.floatleft {
269264 margin: 0.3em 0.5em 0.5em 0;
270 - position: relative;
271265 border: 0.5em solid white;
272266 border-width: 0.5em 1.4em 0.8em 0;
273267 }
@@ -303,14 +297,10 @@
304298 border: none !important;
305299 background: none !important;
306300 }
307 -div.tright {
308 - clear: right;
309 - float: right;
 301+/* @noflip */div.tright {
310302 margin: 0.5em 0 1.3em 1.4em;
311303 }
312 -div.tleft {
313 - float: left;
314 - clear: left;
 304+/* @noflip */div.tleft {
315305 margin: 0.5em 1.4em 1.3em 0;
316306 }
317307 img.thumbborder {
Index: trunk/phase3/skins/monobook/main.css
@@ -373,11 +373,7 @@
374374 }
375375
376376 /* images */
377 -/* @noflip */
378 -div.floatright, table.floatright {
379 - clear: right;
380 - float: right;
381 - position: relative;
 377+/* @noflip */div.floatright, table.floatright {
382378 margin: 0 0 .5em .5em;
383379 border: 0;
384380 /*
@@ -386,11 +382,7 @@
387383 */
388384 }
389385 div.floatright p { font-style: italic; }
390 -/* @noflip */
391 -div.floatleft, table.floatleft {
392 - float: left;
393 - clear: left;
394 - position: relative;
 386+/* @noflip */div.floatleft, table.floatleft {
395387 margin: 0 .5em .5em 0;
396388 border: 0;
397389 /*
@@ -433,16 +425,10 @@
434426 border: none !important;
435427 background: none !important;
436428 }
437 -/* @noflip */
438 -div.tright {
439 - clear: right;
440 - float: right;
 429+/* @noflip */div.tright {
441430 margin: .5em 0 1.3em 1.4em;
442431 }
443 -/* @noflip */
444 -div.tleft {
445 - float: left;
446 - clear: left;
 432+/* @noflip */div.tleft {
447433 margin: .5em 1.4em 1.3em 0;
448434 }
449435 img.thumbborder {
Index: trunk/phase3/skins/modern/main.css
@@ -479,11 +479,7 @@
480480 }
481481
482482 /* images */
483 -/* @noflip */
484 -div.floatright, table.floatright {
485 - clear: right;
486 - float: right;
487 - position: relative;
 483+/* @noflip */div.floatright, table.floatright {
488484 margin: 0 0 .5em .5em;
489485 border: 0;
490486 /*
@@ -492,11 +488,7 @@
493489 */
494490 }
495491 div.floatright p { font-style: italic; }
496 -/* @noflip */
497 -div.floatleft, table.floatleft {
498 - float: left;
499 - clear: left;
500 - position: relative;
 492+/* @noflip */div.floatleft, table.floatleft {
501493 margin: 0 .5em .5em 0;
502494 border: 0;
503495 /*
@@ -539,16 +531,10 @@
540532 border: none !important;
541533 background: none !important;
542534 }
543 -/* @noflip */
544 -div.tright {
545 - clear: right;
546 - float: right;
 535+/* @noflip */div.tright {
547536 margin: .5em 0 .8em 1.4em;
548537 }
549 -/* @noflip */
550 -div.tleft {
551 - float: left;
552 - clear: left;
 538+/* @noflip */div.tleft {
553539 margin: .5em 1.4em .8em 0;
554540 }
555541 img.thumbborder {
Index: trunk/phase3/skins/common/shared.css
@@ -63,8 +63,8 @@
6464 margin-left: 5px;
6565 }
6666 /* Correct directionality when page dir is different from site/user dir */
67 -/* @noflip */.mw-content-ltr .editsection, .mw-content-rtl [dir="ltr"] .editsection { float: right; }
68 -/* @noflip */.mw-content-rtl .editsection, .mw-content-ltr [dir="rtl"] .editsection { float: left; }
 67+/* @noflip */div#content [dir="ltr"] .editsection, div#content [dir="rtl"] [dir="ltr"] .editsection { float: right; }
 68+/* @noflip */div#content [dir="rtl"] .editsection, div#content [dir="ltr"] [dir="rtl"] .editsection { float: left; }
6969 /**
7070 * File histories
7171 */
@@ -614,12 +614,12 @@
615615 }
616616
617617 /* Correct directionality when page dir is different from site/user dir */
618 -/* @noflip */.mw-content-ltr ul, .mw-content-ltr ol,
619 -.mw-content-rtl [dir="ltr"] ul, .mw-content-rtl [dir="ltr"] ol {
 618+/* @noflip */div#content [dir="ltr"] ul, div#content [dir="ltr"] ol,
 619+div#content [dir="rtl"] [dir="ltr"] ul, div#content [dir="rtl"] [dir="ltr"] ol {
620620 margin: .3em 0 0 1.5em;
621621 }
622 -/* @noflip */.mw-content-rtl ul, .mw-content-rtl ol,
623 -.mw-content-ltr [dir="rtl"] ul, .mw-content-ltr [dir="rtl"] ol {
 622+/* @noflip */div#content [dir="rtl"] ul, div#content [dir="rtl"] ol,
 623+div#content [dir="ltr"] [dir="rtl"] ul, div#content [dir="ltr"] [dir="rtl"] ol {
624624 margin: .3em 1.5em 0 0;
625625 }
626626 /* Localised ordered list numbering for some languages */
@@ -649,22 +649,22 @@
650650 }
651651
652652 /* Correct directionality when page dir is different from site/user dir */
653 -/* @noflip */.mw-content-ltr .toc ul, .mw-content-ltr #toc ul,
654 -.mw-content-rtl [dir="ltr"] .toc ul, .mw-content-rtl [dir="ltr"] #toc ul {
 653+/* @noflip */div#content [dir="ltr"] .toc ul, div#content [dir="ltr"] #toc ul,
 654+div#content [dir="rtl"] [dir="ltr"] .toc ul, div#content [dir="rtl"] [dir="ltr"] #toc ul {
655655 text-align: left;
656656 margin-left: 0;
657657 }
658 -/* @noflip */.mw-content-rtl .toc ul, .mw-content-rtl #toc ul,
659 -.mw-content-ltr [dir="rtl"] .toc ul, .mw-content-ltr [dir="rtl"] #toc ul {
 658+/* @noflip */div#content [dir="rtl"] .toc ul, div#content [dir="rtl"] #toc ul,
 659+div#content [dir="ltr"] [dir="rtl"] .toc ul, div#content [dir="ltr"] [dir="rtl"] #toc ul {
660660 text-align: right;
661661 margin-right: 0;
662662 }
663 -/* @noflip */.mw-content-ltr .toc ul ul, .mw-content-ltr #toc ul ul,
664 -.mw-content-rtl [dir="ltr"] .toc ul ul, .mw-content-rtl [dir="ltr"] #toc ul ul {
 663+/* @noflip */div#content [dir="ltr"] .toc ul ul, div#content [dir="ltr"] #toc ul ul,
 664+div#content [dir="rtl"] [dir="ltr"] .toc ul ul, div#content [dir="rtl"] [dir="ltr"] #toc ul ul {
665665 margin: 0 0 0 2em;
666666 }
667 -/* @noflip */.mw-content-rtl .toc ul ul, .mw-content-rtl #toc ul ul,
668 -.mw-content-ltr [dir="rtl"] .toc ul ul, .mw-content-ltr [dir="rtl"] #toc ul ul {
 667+/* @noflip */div#content [dir="rtl"] .toc ul ul, div#content [dir="rtl"] #toc ul ul,
 668+div#content [dir="ltr"] [dir="rtl"] .toc ul ul, div#content [dir="ltr"] [dir="rtl"] #toc ul ul {
669669 margin: 0 2em 0 0;
670670 }
671671
@@ -775,4 +775,17 @@
776776 border-bottom: 1px solid #aaa;
777777 padding-bottom: 0.5em;
778778 margin-bottom: 0.5em;
 779+}
 780+
 781+/* Images */
 782+/* @noflip */div.tright, div.floatright, table.floatright {
 783+ clear: right;
 784+ float: right;
 785+}
 786+/* @noflip */div.tleft, div.floatleft, table.floatleft {
 787+ float: left;
 788+ clear: left;
 789+}
 790+div.floatright, table.floatright, div.floatleft, table.floatleft {
 791+ position: relative;
779792 }
\ No newline at end of file
Index: trunk/phase3/skins/simple/main.css
@@ -259,19 +259,13 @@
260260 border-bottom: solid 1px black;
261261 }
262262
263 -div.floatright, table.floatright {
264 - clear: right;
265 - float: right;
 263+/* @noflip */div.floatright, table.floatright {
266264 margin: 0;
267 - position: relative;
268265 border-width: 0.5em 0 0.8em 1.4em;
269266 }
270267 div.floatright p { font-style: italic; }
271 -div.floatleft, table.floatleft {
272 - float: left;
273 - clear: left;
 268+/* @noflip */div.floatleft, table.floatleft {
274269 margin: 0.3em 0.5em 0.5em 0;
275 - position: relative;
276270 border-width: 0.5em 1.4em 0.8em 0;
277271 }
278272 div.floatleft p { font-style: italic; }
@@ -302,14 +296,10 @@
303297 border: none !important;
304298 background: none !important;
305299 }
306 -div.tright {
307 - clear: right;
308 - float: right;
 300+/* @noflip */div.tright {
309301 border-width: 0.5em 0 0.8em 1.4em;
310302 }
311 -div.tleft {
312 - float: left;
313 - clear: left;
 303+/* @noflip */div.tleft {
314304 margin-right:0.5em;
315305 border-width: 0.5em 1.4em 0.8em 0;
316306 }
Index: trunk/phase3/skins/vector/screen.css
@@ -895,18 +895,12 @@
896896 font-size: 94%;
897897 }
898898 /* Images */
899 -div.floatright, table.floatright {
900 - clear: right;
901 - float: right;
902 - position: relative;
 899+/* @noflip */div.floatright, table.floatright {
903900 margin: 0 0 .5em .5em;
904901 border: 0;
905902 }
906903 div.floatright p { font-style: italic; }
907 -div.floatleft, table.floatleft {
908 - float: left;
909 - clear: left;
910 - position: relative;
 904+/* @noflip */div.floatleft, table.floatleft {
911905 margin: 0 .5em .5em 0;
912906 border: 0;
913907 }
@@ -945,16 +939,10 @@
946940 border: none !important;
947941 background: none !important;
948942 }
949 -/* @noflip */
950 -div.tright {
951 - clear: right;
952 - float: right;
 943+/* @noflip */div.tright {
953944 margin: .5em 0 1.3em 1.4em;
954945 }
955 -/* @noflip */
956 -div.tleft {
957 - float: left;
958 - clear: left;
 946+/* @noflip */div.tleft {
959947 margin: .5em 1.4em 1.3em 0;
960948 }
961949 img.thumbborder {

Follow-up revisions

RevisionCommit summaryAuthorDate
r91518(bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionali...robin02:26, 6 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90743Directionality improvements as part of bug 6100 (under $wgBetterDirectionality):...robin23:01, 24 June 2011

Comments

#Comment by Krinkle (talk | contribs)   18:34, 14 August 2011

Editsection on special pages ?

#Comment by 😂 (talk | contribs)   19:17, 14 August 2011

Editsection should be disabled on all special pages, per r92703.

#Comment by SPQRobin (talk | contribs)   21:16, 14 August 2011

The change from .mw-content-ltr/rtl to div#content [dir="ltr/rtl"] is reverted meanwhile, so it is no longer relevant. I don't think there are use cases where editsection is outside of .mw-content-ltr/rtl (it shouldn't, as the CSS needs that class for proper BiDi support of editsection).

Status & tagging log