r83711 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83710‎ | r83711 | r83712 >
Date:19:43, 11 March 2011
Author:raylton.sousa
Status:deferred (Comments)
Tags:
Comment:
add mw- prefix in css classes
Modified paths:
  • /trunk/extensions/BookManager/BookManager.body.php (modified) (history)
  • /trunk/extensions/BookManager/bookmanager.css (modified) (history)

Diff [purge]

Index: trunk/extensions/BookManager/BookManager.body.php
@@ -199,7 +199,7 @@
200200 $booktitle = Title::newFromText( $prefixes['community-prefix'] . self::bookparts( $parser, $text, 0) ); // ...the book name will be 'Foo'.
201201
202202 $cap = self::loadListFromCollection( $booktitle );
203 - if ( $cap ===false ) {
 203+ if ( $cap === false ) {
204204 return '';
205205 }
206206 $current = array_search( $pagetitle, $cap );
Index: trunk/extensions/BookManager/bookmanager.css
@@ -1,4 +1,4 @@
2 -.book-navigation{
 2+.mw-book-navigation{
33 -moz-border-radius:4px; /* Firefox, etc */
44 -khtml-border-radius:4px; /* Konqueror, etc */
55 -webkit-border-radius:4px; /* Safari, Google Chrome, etc */
@@ -12,26 +12,26 @@
1313 display:table;
1414 clear:both;
1515 }
16 -.book-navigation li{
 16+.mw-book-navigation li{
1717 list-style:none;
1818 display:inline;
1919 display:table-cell;
2020 }
21 -.book-navigation .prev, .book-navigation .next{
 21+.mw-book-navigation .mw-prev, .mw-book-navigation .mw-next{
2222 white-space:nowrap;
2323 }
24 -.book-navigation .index{
 24+.mw-book-navigation .mw-index{
2525 padding:0 5em;
2626 }
27 -.book-navigation .prev a{
 27+.mw-book-navigation .mw-prev a{
2828 background:url("images/18px-1leftarrow.png") no-repeat scroll left center transparent;
2929 padding:0 0 0 20px;
3030 }
31 -.book-navigation .index a{
 31+.mw-book-navigation .mw-index a{
3232 background:url("images/18px-1uparrow.png") no-repeat scroll left center transparent;
3333 padding:0 0 0 20px;
3434 }
35 -.book-navigation .next a{
 35+.mw-book-navigation .mw-next a{
3636 background:url("images/18px-1rightarrow.png") no-repeat scroll right center transparent;
3737 padding:0 20px 0 0;
3838 }

Comments

#Comment by He7d3r (talk | contribs)   13:08, 12 March 2011

I didn't find any guideline about this on Manual:Coding_conventions#CSS, but is "mw-prev" is specific enough to avoid future conflict with other extensions?

#Comment by He7d3r (talk | contribs)   14:02, 12 March 2011

For example: The Extension:CodeReview uses the mw-codereview- prefix for its classe names.

Status & tagging log