https://bugzilla.wikimedia.org/show_bug.cgi?id=38929
--- Comment #5 from Krinkle <[email protected]> 2012-08-04 20:42:11 UTC --- Because the output is not always a <pre>. And also, there is no enforcement whatsoever that the class "mw-code" has to be on a <div>, or that it has to be a wrapping element around the 'real' element. The mw-code class is a generic style rule that is to be applied to blocks of code and individual skins can customize the look of such blocks through that class. In the case of the SyntaxHighlight_Geshi extension the <pre> element is not generated by MediaWiki, it is generated by the geshi library. Moreoever (as already explained before) the inner element is variable. It is not always a <pre>. It can also be a different block level element (i.e. <div>) that geshi's hard-locking css rules turn into a pre-looking element. Therefor we use a generic node name agnostic class name that can be applied to any element. Be it a <div>, <pre> or whatever. In the case of the SyntaxHighlight_Geshi extension, the <pre> or <div> can't be customized because it is generated by the library automatically, so in there we wrap it in mw-code class. In other cases (e.g. MediaWiki:Foo/bar.js) the element wrapper is however generated by MediaWiki and in there the class can be applied to the container directly. So, no, using only "pre {}" as the selector does: 1) not work in all cases, because it is not always a <pre> 2) does not work ever at all in the case of SyntaxHighlight_Geshi because geshi has inline style rules that override any and all stylesheets. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
