https://bugzilla.wikimedia.org/show_bug.cgi?id=260
--- Comment #27 from Krinkle <[email protected]> 2012-07-29 21:14:26 UTC --- (In reply to comment #26) > My point is that .mw-code should *not* have this rule (or, in fact, these > rules). .mw-code elements always have another div, then a pre inside – and > only > this pre should have the white-space and no-wrap rules set. Then we don't have > to care about newlines being inserted or removed or whatnot. I understand your point, but that doesn't solve the problem. Let me elaborate. ".mw-code" does need these rules. The elements have no space between them, so that works perfectly fine (if Tidy is disabled - or if bug 38800 is fixed). The mw-code class is not DIV-specific, it is for any element that can contain code. It can be applied to a DIV, PRE or any other (block-)level element for that matter. In the specific case of the Geshi syntaxhighlighter extension the reason it wraps in a DIV (instead of applying the class to the <pre> directly, which would also solve your problem) - is because the <pre> element is outputted as part of the third-party geshi lib itself. It is not controllable (the extension doesn't output <div class="mw-code"><pre> + code + </pre></div> but <div class="mw-code">+ (geshi output) + </div>. The third-party output in the case of the geshi extension is a <pre> element, however other extensions may output code in other ways. Aside from that, even within geshi, the wrapper element itself is variable (it can be a <div> too, so in that case there wouldn't even be a <pre> *anywhere*). And to go even further, the geshi-lib contains hardcoded css rules that basically overrules any and all css on elements that it "owns". So setting css rules on ".mw-code > pre.geshi-internal" is (aside from being horribly specific and not belonging in MediaWiki core) wouldn't even work because Geshi has an inline reset on elements it "owns" (which makes sense to some degree). Therefore the only reliable way to style the outline of a code is to use a stand-alone class ("mw-code" in this case). And let it be applied to whatever it be applied to. This can be applied to a <pre> directly, or to a wrapper. Works either way. But due to bug 38800 it causes vertical lines to be prepended when used in Geshi with Tidy enabled (when not using Geshi or not configuring Tidy to do this, it works fine) -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
