2015-06-25 11:05:19 +00:00
|
|
|
.mw-highlight {
|
2015-07-11 11:50:41 +00:00
|
|
|
/* All supported programming languages are written left-to-right */
|
|
|
|
/* @noflip */
|
|
|
|
direction: ltr;
|
2015-06-25 11:05:19 +00:00
|
|
|
unicode-bidi: embed;
|
|
|
|
}
|
2015-06-25 11:38:37 +00:00
|
|
|
|
2015-10-20 14:26:25 +00:00
|
|
|
.mw-highlight pre {
|
|
|
|
/* Use a more commonly found tab size of 4 (e.g. as used in CodeEditor)
|
|
|
|
instead of the browser-default value of 8 */
|
2015-10-28 10:47:17 +00:00
|
|
|
-moz-tab-size: 4;
|
|
|
|
-o-tab-size: 4;
|
2015-10-20 14:26:25 +00:00
|
|
|
tab-size: 4;
|
|
|
|
}
|
|
|
|
|
2015-06-25 11:38:37 +00:00
|
|
|
/* 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;
|
|
|
|
}
|
2015-06-26 00:15:40 +00:00
|
|
|
|
2017-04-27 16:38:55 +00:00
|
|
|
/* The nested pre already has a background. T126010 */
|
|
|
|
div.mw-hightlight {
|
|
|
|
background-color: inherit;
|
|
|
|
}
|
|
|
|
|
2015-06-26 00:15:40 +00:00
|
|
|
/*
|
|
|
|
* 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 {
|
2015-07-03 13:42:46 +00:00
|
|
|
border: 0;
|
2015-06-26 00:15:40 +00:00
|
|
|
}
|
2015-06-30 21:04:39 +00:00
|
|
|
|
|
|
|
/* Highlight background of whole lines, not just text in them */
|
|
|
|
.mw-highlight .hll {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2016-04-11 12:25:40 +00:00
|
|
|
/* Make line numbers non copyable */
|
|
|
|
.mw-highlight .lineno {
|
|
|
|
-moz-user-select: none;
|
|
|
|
-webkit-user-select: none;
|
|
|
|
-ms-user-select: none;
|
2017-11-07 18:32:39 +00:00
|
|
|
user-select: none;
|
2016-04-11 12:25:40 +00:00
|
|
|
}
|
|
|
|
|
2015-06-30 21:04:39 +00:00
|
|
|
/* 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;
|
|
|
|
}
|