]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - extensions/SyntaxHighlight_GeSHi/modules/pygments.wrapper.css
MediaWiki 1.30.2-scripts
[autoinstalls/mediawiki.git] / extensions / SyntaxHighlight_GeSHi / modules / pygments.wrapper.css
1 .mw-highlight {
2         /* All supported programming languages are written left-to-right */
3         /* @noflip */
4         direction: ltr;
5         unicode-bidi: embed;
6 }
7
8 .mw-highlight pre {
9         /* Use a more commonly found tab size of 4 (e.g. as used in CodeEditor)
10         instead of the browser-default value of 8 */
11         -moz-tab-size: 4;
12         -o-tab-size: 4;
13         tab-size: 4;
14 }
15
16 /* Avoid displaying double borders for nested 'code' elements.
17    Before we started using the 'code' tag for inline code snippets,
18    <code><syntaxhighlight enclose=none ...>...</syntaxhighlight></code>
19    was a common pattern. Continue supporting it in existing content. */
20 code code.mw-highlight {
21         background-color: transparent;
22         border: 0;
23         padding: 0;
24 }
25
26 /* The nested pre already has a background. T126010 */
27 div.mw-hightlight {
28         background-color: inherit;
29 }
30
31 /*
32  * Don't show a red border around syntax errors. This behavior may be useful
33  * in code editors, but it is not useful in a wiki environment, especially
34  * given the longstanding habit of using an existing, mostly-compatible lexer
35  * to highlight a language for which no lexer exists.
36  */
37 .mw-highlight .err {
38         border: 0;
39 }
40
41 /* Highlight background of whole lines, not just text in them */
42 .mw-highlight .hll {
43         display: block;
44 }
45
46 /* Make line numbers non copyable */
47 .mw-highlight .lineno {
48         -moz-user-select: none;
49         -webkit-user-select: none;
50         -ms-user-select: none;
51 }
52
53 /* To interact better with the 'display: block' above, doesn't affect other uses */
54 /* @noflip */
55 .mw-highlight.mw-content-ltr .lineno {
56         float: left;
57 }
58
59 /* @noflip */
60 .mw-highlight.mw-content-rtl .lineno {
61         float: right;
62 }