mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-12-02 18:06:24 +00:00
6b1a4a6d8c
Follow-up to043969f84e
. It is not needed for current HTML generated by the extension tag, but is required for compatibility with cached renders generated between6484894497
and043969f84e
. Bug: T105499 Change-Id: Ie15d9c7fb673528b2ab5e40e6beddc580fb6d368
43 lines
1.1 KiB
CSS
43 lines
1.1 KiB
CSS
.mw-highlight {
|
|
/* All supported programming languages are written left-to-right */
|
|
/* @noflip */
|
|
direction: ltr;
|
|
unicode-bidi: embed;
|
|
}
|
|
|
|
/* Avoid displaying double borders for nested 'code' elements.
|
|
Before we started using the 'code' tag for inline code snippets,
|
|
<code><syntaxhighlight enclose=none ...>...</syntaxhighlight></code>
|
|
was a common pattern. Continue supporting it in existing content. */
|
|
code code.mw-highlight {
|
|
background-color: transparent;
|
|
border: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/*
|
|
* Don't show a red border around syntax errors. This behavior may be useful
|
|
* in code editors, but it is not useful in a wiki environment, especially
|
|
* given the longstanding habit of using an existing, mostly-compatible lexer
|
|
* to highlight a language for which no lexer exists.
|
|
*/
|
|
.mw-highlight .err {
|
|
border: 0;
|
|
}
|
|
|
|
/* Highlight background of whole lines, not just text in them */
|
|
.mw-highlight .hll {
|
|
display: block;
|
|
}
|
|
|
|
/* To interact better with the 'display: block' above, doesn't affect other uses */
|
|
/* @noflip */
|
|
.mw-highlight.mw-content-ltr .lineno {
|
|
float: left;
|
|
}
|
|
|
|
/* @noflip */
|
|
.mw-highlight.mw-content-rtl .lineno {
|
|
float: right;
|
|
}
|