User "Krinkle" changed the status of MediaWiki.r91772. Old Status: new New Status: fixme
User "Krinkle" also posted a comment on MediaWiki.r91772. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91772#c21950 Commit summary: Inline CSS is bad in itself and bad for RTL support (why was there even a message containing CSS?) Comment: I didn't understand the <code>mw-align-start/end</code> and <code>mw-float-start/end</code> at first, but SPQRobin explained it to me. Repeating here in my own words for later reference. <code>mw-float-start/end</code> allows to float an element to the side where either the text starts, or to the opposite side. For example, if a diagram should be floated to the right of the page in an LTR context, then it should float to the left of the page in an RTL context. On such element you could use <code>mw-float-end</code>. That's all nice. But from a front-end perspective it's not very semantic in my opinion and it doesn't solve anything. Consider the following example: <pre> --- CSS .mw-float-left { float: left; /* flipped by ResourceLoader */ } .mw-float-end { float: right; /* flipped by ResourceLoader */ } .infobox { border: 1px solid grey; ... } --- HTML <div class="infobox mw-float-end"> ... </div> </pre> I would rather have us do the following, and therewith separate presentation from content. <pre> -- CSS .infobox { float: right; /* flipped by ResourceLoader as needed */ border: 1px solid grey; ... } --- HTML <div class="infobox"> ... </div> </pe> To use an extreme example: Suppose there's a class for "error" that is declared like <code>.error { color: red; }</code> and another called "love": <code>.love { color: red; }</code>, we wouldn't go and use a class "red-text" and use <code><nowiki><div class="red-text"></nowiki></code> for both.... That's the opposite of what CSS is meant to be used for. Marking fixme. Use meaningful classes for elements that need special presentation (ie. "mw-collection-label-download"). _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
